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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 275A0C4167B for ; Mon, 30 Oct 2023 19:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231641AbjJ3TZZ (ORCPT ); Mon, 30 Oct 2023 15:25:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjJ3TZX (ORCPT ); Mon, 30 Oct 2023 15:25:23 -0400 Received: from gentwo.org (gentwo.org [62.72.0.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00D65B4 for ; Mon, 30 Oct 2023 12:25:20 -0700 (PDT) Received: by gentwo.org (Postfix, from userid 1003) id BD90248F2C; Mon, 30 Oct 2023 12:25:19 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id BC0EE48CA2; Mon, 30 Oct 2023 12:25:19 -0700 (PDT) Date: Mon, 30 Oct 2023 12:25:19 -0700 (PDT) From: Christoph Lameter To: Chengming Zhou cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chengming Zhou Subject: Re: [RFC PATCH v3 0/7] slub: Delay freezing of CPU partial slabs In-Reply-To: <1199315b-63ce-4be4-8cde-b8b2fd29f91a@linux.dev> Message-ID: <7f70d130-c05a-3cb7-9509-41c21c3014fb@linux.com> References: <20231024093345.3676493-1-chengming.zhou@linux.dev> <1199315b-63ce-4be4-8cde-b8b2fd29f91a@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 28 Oct 2023, Chengming Zhou wrote: > 2. But for full slab (slab->freelist == NULL), PG_workingset is not much useful, we don't > safely know whether it's used as the cpu slab or not just from this flag. So __slab_free() > still rely on the "frozen" bit to know it. > > 3. And the maintaining of "frozen" has no extra cost now, since it's changed together with "freelist" > and other counter using cmpxchg, we already have the cmpxchg when start to use a slab as the cpu slab. > > Maybe I missed something, I don't know how to drop the frozen flag. Maybe frozen is now = PG_Workingset | cmpxchg-frozen?