From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E655FC2B9F8 for ; Tue, 25 May 2021 08:08:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7E9D613F9 for ; Tue, 25 May 2021 08:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbhEYIKU (ORCPT ); Tue, 25 May 2021 04:10:20 -0400 Received: from vmi485042.contaboserver.net ([161.97.139.209]:39878 "EHLO gentwo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbhEYIJI (ORCPT ); Tue, 25 May 2021 04:09:08 -0400 Received: by gentwo.de (Postfix, from userid 1001) id 570EFB003B1; Tue, 25 May 2021 10:06:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id 536FEB00034; Tue, 25 May 2021 10:06:31 +0200 (CEST) Date: Tue, 25 May 2021 10:06:31 +0200 (CEST) From: Christoph Lameter To: Vlastimil Babka cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Rientjes , Pekka Enberg , Joonsoo Kim , Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn Subject: Re: [RFC 01/26] mm, slub: allocate private object map for sysfs listings In-Reply-To: <20210524233946.20352-2-vbabka@suse.cz> Message-ID: References: <20210524233946.20352-1-vbabka@suse.cz> <20210524233946.20352-2-vbabka@suse.cz> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 May 2021, Vlastimil Babka wrote: > Slub has a static spinlock protected bitmap for marking which objects are on > freelist when it wants to list them, for situations where dynamically > allocating such map can lead to recursion or locking issues, and on-stack > bitmap would be too large. > > The handlers of sysfs files alloc_calls and free_calls also currently use this > shared bitmap, but their syscall context makes it straightforward to allocate a > private map before entering locked sections, so switch these processing paths > to use a private bitmap. Right in that case a GFP_KERNEL allocation is fine and you can avoid the static map. Acked-by: Christoph Lameter