Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp4323rdb; Mon, 30 Oct 2023 20:47:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/ObjgR0VQ0Afk34o+yrrk4sB+y9HlCjjC+4mO6omvfArEXR95Wu7D9om2zmdIpBEBvBg8 X-Received: by 2002:a05:6a20:1601:b0:17b:65ec:776c with SMTP id l1-20020a056a20160100b0017b65ec776cmr1957128pzj.20.1698724074796; Mon, 30 Oct 2023 20:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698724074; cv=none; d=google.com; s=arc-20160816; b=FLuv9YxzmJtvFz1n5mLvK0KrqXNLQnRLHlVBNXPO6hg9BWTHuOQv3+VnMduqsJ4PVM o421WPE2lAGn4BjtUtnY+k6dQ0qFwHEncMqZ7abF7TEWpQNeDMqzjeAp49WV+d2cK3QP JlfIuZFNUEgehMeIsybRnbk1UBKjhriROq1NBws9IMAf7iBT/b3DAGCi4OIeqq4ZlAaG nP9+akf4qExnEDa3tWyUue2iE9Ai970WOnnsNqt+oCYmovZYE3G2uv6T75bLXfJJOr2p H4Av6Ug10khWUHjxumZgdYb8Co/12uWSUaIrfqng8zQOg2FthqubcccJCu+N20sFbVz6 Ungg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=rv3mvEtAQZcWA/zWJ6Zf5uD/n/90RT/CICIfI/Hbxts=; fh=QOaYd74KVrBvON9f+VGf+7ioMVkY2eLl5ZiSarfM4zg=; b=Bxf5AtVIWKvKxzgkOSH5hlqqsNEJ7UDAld8okbJYkKDQG7RAQjdpXV1ssvJlz+hA11 h8rL45l06iRdR7tE+er9S8nY9LM+iZ11T8VLj56ksSyjLAAviwNPFDHGyUZro6MAW9KV H5nZc95J9pH2hPs3A7vioC5GKkegXHUZNVVrVVh1jh3aQa8u5e/xtKs2+6usSvx6Ai1M Aw5ehalgdvSTmyBFbBV2bkyE2C72uYZswt0/aroJu1yn49XxsXNWGM7GrLf/iWCdNm15 XhTeBo4Ko5+2jNm22HxWwMNCqcA9OZpMDU6S7sGA3f1suEcAIejtDBdW3E49XwcjXOxI LT7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f16-20020aa79d90000000b0068e2b1d5651si374774pfq.281.2023.10.30.20.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 20:47:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8AEEB80BA64E; Mon, 30 Oct 2023 20:47:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235523AbjJaDrM (ORCPT + 99 others); Mon, 30 Oct 2023 23:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231158AbjJaDrK (ORCPT ); Mon, 30 Oct 2023 23:47:10 -0400 X-Greylist: delayed 30107 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 30 Oct 2023 20:47:07 PDT Received: from gentwo.org (gentwo.org [IPv6:2a02:4780:10:3cd9::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4EEAE6 for ; Mon, 30 Oct 2023 20:47:07 -0700 (PDT) Received: by gentwo.org (Postfix, from userid 1003) id CC31648CA2; Mon, 30 Oct 2023 20:47:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id CABB3489FB; Mon, 30 Oct 2023 20:47:06 -0700 (PDT) Date: Mon, 30 Oct 2023 20:47:06 -0700 (PDT) From: Christoph Lameter To: Chengming Zhou 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 Subject: Re: [RFC PATCH v3 0/7] slub: Delay freezing of CPU partial slabs In-Reply-To: <1dcc9969-da5b-4384-96d8-d03c835f198e@linux.dev> Message-ID: References: <20231024093345.3676493-1-chengming.zhou@linux.dev> <1199315b-63ce-4be4-8cde-b8b2fd29f91a@linux.dev> <7f70d130-c05a-3cb7-9509-41c21c3014fb@linux.com> <1dcc9969-da5b-4384-96d8-d03c835f198e@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Mon, 30 Oct 2023 20:47:52 -0700 (PDT) On Tue, 31 Oct 2023, Chengming Zhou wrote: > The current scheme (which this series implemented) is: > > - node partial slabs: PG_Workingset (set or clear with per-node list_lock protection) > - cpu partial slabs: !PG_Workingset And then the frozen flag needs to be set. Otherwise slab_free() would conclude it is on a partial list? > - cpu slabs: !PG_Workingset && frozen (set or clear using cmpxchg together with freelist) > - full slabs: !PG_Workingset And frozen is clear? Otherwise it is the same as a cpu partial slab. > As Vlastimil noted, it's possible to drop "frozen" bit for cpu slabs, but > we keep it for performance, since we don't need to grab node list_lock to > check whether PG_Workingset is set or not if the "frozen" bit is set. > > Thanks! >