Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4163837pxj; Tue, 25 May 2021 01:40:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/ZcKIFqtxw8t2B7OLjQ8NA0MrjuQs0qYArvgK5gYHDuB/xAuQIUOif3gYN6vAGstXfmYf X-Received: by 2002:a17:906:dfe9:: with SMTP id lc9mr26564230ejc.62.1621932040616; Tue, 25 May 2021 01:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621932040; cv=none; d=google.com; s=arc-20160816; b=d3Z8Zu95wH14rmqcZVskO3JEPpQ5YdyH8HJvntdeGtguBfykeQTVznhgUPLBbIDDb+ 4yeWZuUQcd8hYxIsvEGCoGdvF/mGjNJvTlWJUaJJbfd3WEBFi2tawS6Uizpy6CNqFuZb kwHSwA7G1xn8Hu0k35FwK4a9QKhL9sC3jx2QJIyWJSV6U9O0SnGAyHFAgH84zrsJftCQ ytyaSfivaePy7ux3coIvw0B1TEjVvxDDhoyLi3UCGfsskP0k4+YRGx6EKtx5YbMDI59s yQAkQNe1XuvgSXxZ3mF2eOQzgcQ7GVWIy3O8eq0PjMCyts4EWpH04HBG73LiP+OLyijH n00g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=ATOI5a7uqmib1DIazcpQ9hvsOX/NtppZIQmr0vk33cM=; b=qSp6RV7FeDVCAsiS8cAO2utN+N6xDGlPxGH5EeuB/KpOAdzzkGjkB5Tvb2MIIb2Rn3 1CDTUkMS8Cw65aGBJa6H4oTc2ZnstINEnSGr+7NXtwGTm7OcKlVIUKe4nPnvQ+hKeIyn QwCDQX2Lhr8AcBwKLV+4wxxQFP2oO9OxXiPBuvo2/SMEvfj/ulHxhg/hyxQ4mzvJibzZ Ft45G8zjqiPuGppulBkmJBu95oBxeMzNiI4ys6x/UdUAxgoBMIqqqIzEQjDrnuIDQI8f h60dhd1Xglu4zIFpQaMgTgt5RmPn11oaT/V081aYP1qpcYyGbQoc+tHqn3Qmr4Mv7Yc2 fD+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si18281274edf.438.2021.05.25.01.40.17; Tue, 25 May 2021 01:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232234AbhEYIKT (ORCPT + 99 others); Tue, 25 May 2021 04:10:19 -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