Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp87154rdb; Mon, 4 Dec 2023 22:07:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRVe4BCoaUpgJW+ySnZpLbkF+fuMlswju1hqGaMzC/dW9+Nef2CE+2t6/W5uEgAUBpAQme X-Received: by 2002:a05:6358:91c:b0:170:742:8ad8 with SMTP id r28-20020a056358091c00b0017007428ad8mr6017663rwi.0.1701756420543; Mon, 04 Dec 2023 22:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701756420; cv=none; d=google.com; s=arc-20160816; b=m5kdYQlgfNl4cGiKUpzMtwv2mzHCOkYJvu8OAxEfqghYn/BKzSt0+2q3hDw7hyAwd+ iB2bgg9IWeXFdwToIGbG0I6kkjDICfhEwQ6234/WCSb9CFvQchVHBX0qoN0XZmjKOSOl y5WNIfb4Hd8TrRsW6Df5PgVTdsc+Xt6GRZCBtCcLSj3q5se6Mkd75vk0tTQuQIqXu4VK 4MXW/lY2nR8PK1UmZp+5hIWGGFOUwK5lLPlmjSQwuwyFwRmZJbkvqcG5p/BE5wo3nZdZ Hb2/PwXZU74kPuULwFjEkkHSEFBBoBfbYAxCbDMW3QRDIs3COcce5rivKPHwV8D/jUl/ s29A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=VsRmRaEO4PHPFPipHn4Io6Xoy0VdHjTgPWI63DWkYRg=; fh=wrqs1oxJyDvkU3GhlTFSPMKuRymxZaGN5nePjMKL+c8=; b=f2/EuSj1+gwSt10bVD2QtYKwO52MW/JMD3XClwF4D8M6Fg7IxcY5HKCK9AQ02XqJ02 8qvL7EZ9RZ2MW2HMNiSdHXZfOXB7D+qMXNKZpCpQBqgno6cy4oDy6Gkeo1JOKY52+enH 07/KhtjZWWN2ROX+IG19M9QltsRYg4p+yXT9CFsS5UfRfxv8yvaM3f3lkhI63xAUkLRt yTlFHXuxlH4P3x+DuG44aEIMYKw4ebDB8ZZvsb2dwbID6IU7WtdZHs1lkQ1jQKdrQZf6 SpaSvSWQMqEPvvMQ3d80lL0e47csX7r/36aSeMzZR4oM9hPgibYBEFF+B+hXzpYKILsU rp4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iL1kmkQB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id q3-20020a056a00084300b006cbf1bb0b34si2667128pfk.323.2023.12.04.22.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 22:07:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iL1kmkQB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2D1D38022961; Mon, 4 Dec 2023 22:06:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234787AbjLEGGc (ORCPT + 99 others); Tue, 5 Dec 2023 01:06:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231695AbjLEGGa (ORCPT ); Tue, 5 Dec 2023 01:06:30 -0500 Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4C12C3 for ; Mon, 4 Dec 2023 22:06:36 -0800 (PST) Message-ID: <29bd5cc7-e8e6-4a4d-b526-651c7885a185@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701756394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VsRmRaEO4PHPFPipHn4Io6Xoy0VdHjTgPWI63DWkYRg=; b=iL1kmkQBwgGP924gLcS8obFI0W5s4W9Aku7Jcm3vSTqi6rx5Mvh285Mwy61qfNg3mYiog8 KTi3Ed8WTVAKvMMRpyDjz1MvA+/v740gqdInX9TlLgET/I41EfgBEQ2JuKT6dSqrzX5Mhi mL1tz3beobO6pup7osZZmRP9/24ObJo= Date: Tue, 5 Dec 2023 14:06:29 +0800 MIME-Version: 1.0 Subject: Re: [PATCH v5 9/9] slub: Update frozen slabs documentations in the source Content-Language: en-US To: "Christoph Lameter (Ampere)" Cc: vbabka@suse.cz, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chengming Zhou References: <20231102032330.1036151-1-chengming.zhou@linux.dev> <20231102032330.1036151-10-chengming.zhou@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 04 Dec 2023 22:06:58 -0800 (PST) On 2023/12/5 05:41, Christoph Lameter (Ampere) wrote: > On Thu, 2 Nov 2023, chengming.zhou@linux.dev wrote: > >> From: Chengming Zhou >> >> The current updated scheme (which this series implemented) is: >> - node partial slabs: PG_Workingset && !frozen >> - cpu partial slabs: !PG_Workingset && !frozen >> - cpu slabs: !PG_Workingset && frozen >> - full slabs: !PG_Workingset && !frozen > > The above would be good to include in the comments. > > Acked-by: Christoph Lameter (Ampere) > Thanks for your review and suggestion! Maybe something like this: diff --git a/mm/slub.c b/mm/slub.c index 623c17a4cdd6..21f88bd9c16b 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -93,6 +93,12 @@ * by clearing the PG_workingset flag when moving out of the node * partial list. Please see __slab_free() for more details. * + * To sum up, the current scheme is: + * - node partial slab: PG_Workingset && !frozen + * - cpu partial slab: !PG_Workingset && !frozen + * - cpu slab: !PG_Workingset && frozen + * - full slab: !PG_Workingset && !frozen + * * list_lock * * The list_lock protects the partial and full list on each node and