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 341DDC47084 for ; Tue, 25 May 2021 08:06:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A57396135F for ; Tue, 25 May 2021 08:06:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A57396135F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gentwo.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2DF626B006C; Tue, 25 May 2021 04:06:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28FBB6B006E; Tue, 25 May 2021 04:06:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 133356B0070; Tue, 25 May 2021 04:06:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id D14046B006C for ; Tue, 25 May 2021 04:06:34 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 73EDF2C96 for ; Tue, 25 May 2021 08:06:34 +0000 (UTC) X-FDA: 78179021508.36.0597195 Received: from gentwo.de (vmi485042.contaboserver.net [161.97.139.209]) by imf05.hostedemail.com (Postfix) with ESMTP id 241E1E00080D for ; Tue, 25 May 2021 08:06:26 +0000 (UTC) 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 Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de X-Stat-Signature: 96fbjwfzsaka8dkeit3ohj5ohbbt7mty X-Rspamd-Queue-Id: 241E1E00080D X-Rspamd-Server: rspam02 X-HE-Tag: 1621929986-937563 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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