Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp45427rdb; Mon, 4 Dec 2023 19:54:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNLLB/97QyNKh9b/tCkgggIpE9VUSm2ndOQD78//UBhzP82sqaU97JhDtFyPqFPJ04S687 X-Received: by 2002:a05:6870:55d1:b0:1fb:75b:2bb8 with SMTP id qk17-20020a05687055d100b001fb075b2bb8mr2833161oac.116.1701748482703; Mon, 04 Dec 2023 19:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701748482; cv=none; d=google.com; s=arc-20160816; b=Q1zzO/85hkKrnf/J0gV8Twr/rlRz0JbOJcRGoK92LDE8mdPGY356cFM5+HDBYjNd7p 4l7tslGj/74wZApG3eoMwTET+hkFRIbnma8MYugocXTtd2ltrNpV8QkJAZywiXee4ZsK 4q6dBz/tdbUEjJpBTbRyZVuqn46C/jMMJiscEqoMicOlT+eK/t+NNPrlnj9lVJnGHI7i S9xwRGNKduRgIZyeHiNh5VbHcPkfFUOQyBz5J6L6dCe3VU11H4K5EFc7cShO5vAF/5kV tr/MXMCt5RLO3WvT9NpLIkxsnxBFWyLcYAtix6Q1OKrQPc2A5XaFhgiCUw9Jv8AuMIWY PcNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mAbPD6wQF1oZm18W+YGadKrbUnABiAjudnkBSiNtMNk=; fh=ezGgTJoHdqijbJ6IWHiSjHZUYI0p+VPBCX/sPRmQd+E=; b=l3BgMNTSO8Qfn5C5nY+c2+e2Y3y3CDy3NvmhJd2gCwoaZmueAuBnxv9eH+GQH73Lvd QGU87hM/J9spLi+OhnroYA2w0YVROBw6uWjbBip+TBWx1x8XT6VLpRlVdVUOAGjBeZdU EaV6gnVFCTR3pg9fQDZtEfk+DXmgP5fEN9nC2yCH1vDSvoYGIszL+sWZMJdDgN6W3PbC aR2TXjrPbhaP2ZudOCfrToQ7t1lgdMmVE+Ejx8eCrDmhHM2j3ISR2kCO3bPc1IgowNR0 eH0JziDS/Fzvhh5p3myp5Mcx9zEelrtGCXnWMVTd1742/r8v6gFzeerljjNxtgxV+1lO 158A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j6K24kk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y126-20020a633284000000b005b881cc9498si9117648pgy.339.2023.12.04.19.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 19:54:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j6K24kk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4726280AE523; Mon, 4 Dec 2023 19:54:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbjLEDyD (ORCPT + 99 others); Mon, 4 Dec 2023 22:54:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjLEDyB (ORCPT ); Mon, 4 Dec 2023 22:54:01 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EEDDC6; Mon, 4 Dec 2023 19:54:08 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1d0538d9bbcso33144485ad.3; Mon, 04 Dec 2023 19:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701748447; x=1702353247; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mAbPD6wQF1oZm18W+YGadKrbUnABiAjudnkBSiNtMNk=; b=j6K24kk71kbHS102yFwaK4HFznHq8/pUO0udCrOpXtSw873r5qkAQC3B6RUfFt1rF9 QhyoAG4jcTqs2lsZXV/zZTenqiB4CHm2lcKIUhY+wt7G5CeA4iEdHX073PYkvk+OSQZj csJnyKsLjrQtXB1lCxO/19DQAxfrhNB0lU+Wz4htHDz4tNsNi+PEqHbd4dzydXRLRfwY p2vix5GwkdlWykVMfqr69rH/7MoT4r8kZipAzIWUx7nXl12UenDMgMN8YVaG4s0ewRdc 2oQfp4aZH8beM5rjIK32DgyhR96JQrmGFhFVjEu4ubtJMuLgfnqQ8okPTsoe/f214kmg UlUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701748447; x=1702353247; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mAbPD6wQF1oZm18W+YGadKrbUnABiAjudnkBSiNtMNk=; b=po4AiPXMwQQVEQjnrHOwCkqJ6mVPH7flUH2ofM/htk0vgi38humxDh9rjHXf78mMV0 NqmP2z2BNXhftoc4yyhrUFe0mmTcDxeO9qmnKy/RcSJKBFL9sxGAD1fgRkdM+ACJxkLF XfJLWw747gP4yZaPdfVCrfS8d6qaZn6TvRdBkuxCDSIflmLsS8a65JHHXS69EBGw/vEN h0/wmASqXszCSyEO1uLMldfLQGhL28u853KU5sxWNfayD9z6PVWXvlQNQlPpqJwv4Ttn VUog6/wgeBWxQSibZzz+Upw2AQTpvLYyukurmtA3Pn2zBpdZYEsTxBbYpE4O/flyNZFb ODLQ== X-Gm-Message-State: AOJu0YyRxZFefXdaAATEPlw48+iV7fhZuV4DTjONrVGzaSiApC0x9cnr OxFmEYzMZNFgLNV2aYa/sx0= X-Received: by 2002:a17:902:f54c:b0:1d0:6ffd:e2b0 with SMTP id h12-20020a170902f54c00b001d06ffde2b0mr6599717plf.74.1701748447380; Mon, 04 Dec 2023 19:54:07 -0800 (PST) Received: from localhost.localdomain ([1.245.180.67]) by smtp.gmail.com with ESMTPSA id i8-20020a17090332c800b001b8b2a6c4a4sm9168837plr.172.2023.12.04.19.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 19:54:06 -0800 (PST) Date: Tue, 5 Dec 2023 12:53:51 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton , Roman Gushchin , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Marco Elver , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 01/21] mm/slab, docs: switch mm-api docs generation from slab.c to slub.c Message-ID: References: <20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz> <20231120-slab-remove-slab-v2-1-9c9c70177183@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231120-slab-remove-slab-v2-1-9c9c70177183@suse.cz> X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 04 Dec 2023 19:54:40 -0800 (PST) On Mon, Nov 20, 2023 at 07:34:12PM +0100, Vlastimil Babka wrote: > The SLAB implementation is going to be removed, and mm-api.rst currently > uses mm/slab.c to obtain kerneldocs for some API functions. Switch it to > mm/slub.c and move the relevant kerneldocs of exported functions from > one to the other. The rest of kerneldocs in slab.c is for static SLAB > implementation-specific functions that don't have counterparts in slub.c > and thus can be simply removed with the implementation. > > Signed-off-by: Vlastimil Babka > --- > Documentation/core-api/mm-api.rst | 2 +- > mm/slab.c | 21 --------------------- > mm/slub.c | 21 +++++++++++++++++++++ > 3 files changed, 22 insertions(+), 22 deletions(-) > > diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst > index 2d091c873d1e..af8151db88b2 100644 > --- a/Documentation/core-api/mm-api.rst > +++ b/Documentation/core-api/mm-api.rst > @@ -37,7 +37,7 @@ The Slab Cache > .. kernel-doc:: include/linux/slab.h > :internal: > > -.. kernel-doc:: mm/slab.c > +.. kernel-doc:: mm/slub.c > :export: > > .. kernel-doc:: mm/slab_common.c > diff --git a/mm/slab.c b/mm/slab.c > index 9ad3d0f2d1a5..37efe3241f9c 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -3491,19 +3491,6 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, > } > EXPORT_SYMBOL(kmem_cache_alloc_bulk); > > -/** > - * kmem_cache_alloc_node - Allocate an object on the specified node > - * @cachep: The cache to allocate from. > - * @flags: See kmalloc(). > - * @nodeid: node number of the target node. > - * > - * Identical to kmem_cache_alloc but it will allocate memory on the given > - * node, which can improve the performance for cpu bound structures. > - * > - * Fallback to other node is possible if __GFP_THISNODE is not set. > - * > - * Return: pointer to the new object or %NULL in case of error > - */ > void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) > { > void *ret = slab_alloc_node(cachep, NULL, flags, nodeid, cachep->object_size, _RET_IP_); > @@ -3564,14 +3551,6 @@ void __kmem_cache_free(struct kmem_cache *cachep, void *objp, > __do_kmem_cache_free(cachep, objp, caller); > } > > -/** > - * kmem_cache_free - Deallocate an object > - * @cachep: The cache the allocation was from. > - * @objp: The previously allocated object. > - * > - * Free an object which was previously allocated from this > - * cache. > - */ > void kmem_cache_free(struct kmem_cache *cachep, void *objp) > { > cachep = cache_from_obj(cachep, objp); > diff --git a/mm/slub.c b/mm/slub.c > index 63d281dfacdb..3e01731783df 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -3518,6 +3518,19 @@ void *__kmem_cache_alloc_node(struct kmem_cache *s, gfp_t gfpflags, > caller, orig_size); > } > > +/** > + * kmem_cache_alloc_node - Allocate an object on the specified node > + * @s: The cache to allocate from. > + * @gfpflags: See kmalloc(). > + * @node: node number of the target node. > + * > + * Identical to kmem_cache_alloc but it will allocate memory on the given > + * node, which can improve the performance for cpu bound structures. > + * > + * Fallback to other node is possible if __GFP_THISNODE is not set. > + * > + * Return: pointer to the new object or %NULL in case of error > + */ > void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node) > { > void *ret = slab_alloc_node(s, NULL, gfpflags, node, _RET_IP_, s->object_size); > @@ -3822,6 +3835,14 @@ void __kmem_cache_free(struct kmem_cache *s, void *x, unsigned long caller) > slab_free(s, virt_to_slab(x), x, NULL, &x, 1, caller); > } > > +/** > + * kmem_cache_free - Deallocate an object > + * @s: The cache the allocation was from. > + * @x: The previously allocated object. > + * > + * Free an object which was previously allocated from this > + * cache. > + */ > void kmem_cache_free(struct kmem_cache *s, void *x) > { > s = cache_from_obj(s, x); > Looks good to me, Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > -- > 2.42.1 > >