Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3248667iob; Sun, 1 May 2022 10:56:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXbgmPsI60JUEunTZUjFNwkaOaUPlhvtpWEFEIju3T+DB7WjKGwZwQSPf9i7pKWLjnHM0K X-Received: by 2002:a05:6512:282c:b0:472:5e33:e239 with SMTP id cf44-20020a056512282c00b004725e33e239mr4127800lfb.597.1651427767696; Sun, 01 May 2022 10:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651427767; cv=none; d=google.com; s=arc-20160816; b=aKm5UM/68JomMLpzZy5UZh5YiXaebNvG30ARors1PU8b567dYCbwIFkp1IfZMXIwP0 dzAiRG6004x491DqP852Gn6IPcPv5EhdWmN2a5GLcVK4FEFnmoLHrZkGrv+t6eI/zsUB F7CP+id/kFGjlDTxbFhELNP8DKo7whqYYpCHmcnPq3ZXwAvVlWQtWQP7ekOG1NQ/QUxx vbtQfnSlKTK4af5l47ivNvqB1KNRXcFIjTQ0Ntahixkni2cw2aPkGavitmGGktGbXZqQ NAMbDFSz3ieaU7QqD05CvJ+UGYXJhFWyrKVebTXw25xnT/bGIVpPYQPoq13NhggrjNPd Ujcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=pRe1nR5tFSwQBAo9aill1CVO8UsMYe+4wRXsoq6ptUs=; b=sMyFsERqO9GPSqHyqrzQ4uW2fOH/kZ+7BStc/tc1+2lcHpr+ezASCKG36jC9WVrDT/ iz/ftvI9RXTC07xyFanB5DbzsUNHayT0/fWRxuMUSIxOgEtq2s/b1AIq7swXNDpPIKt/ ey3cnfyEbS7oaY7gXAbu8uhPpsjiMlNpMJ1xr8n7rE/Ia2nx4bnyJSlCuJFEvyGNNwhn 6HtGf1R/z88Se8MVdziVD7lNQ74SsKR9XMh/MrG3zO3Rj8GNnLiWTdFztY8ECBh/scMr zil8dy5HExEQz52fUXBkCPs9/VSF2EjFT7ktPY8KCq9fymcNziD9k2Cog3epFzEpwIS5 QlaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K2C+RIpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a0565120c1200b0047260cac78esi3193391lfu.145.2022.05.01.10.55.40; Sun, 01 May 2022 10:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K2C+RIpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240952AbiD3LsM (ORCPT + 99 others); Sat, 30 Apr 2022 07:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237002AbiD3LsK (ORCPT ); Sat, 30 Apr 2022 07:48:10 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E29760AB6 for ; Sat, 30 Apr 2022 04:44:49 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id k1so581178pll.4 for ; Sat, 30 Apr 2022 04:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pRe1nR5tFSwQBAo9aill1CVO8UsMYe+4wRXsoq6ptUs=; b=K2C+RIpaUjADVZOwmI1sW8TqOxGHMQwWDrWhJMauTnAfnjwjZrm4EAAn/ym7go7UaG 5MOMWlmNeVsvBeRjnaFp7jcCjrthg7uheYs/87FzX9dCOsBcfg0Zred+tpCt6JSMVtxw grpe3GGGT/8Fg0eKsAuVDmiRYe4bEeVag6WnwHAdfKRZr7KpINZXjEeqOsv6OIx4eCD4 CpudTYZwZILqEnSP3231XuVjLfu9dxvbTRgQcXRGXC0RqKUynUmBAljhCF2RUTu6KAQv K3h5w8bIpT46Nu3+eGX2hvzDN29HZcDSQD48AFjR+tBiuwvBs/rg5etjWxGc4nGuHlwA JDTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pRe1nR5tFSwQBAo9aill1CVO8UsMYe+4wRXsoq6ptUs=; b=e877n/F+usuF+GyTu4tWetVSn4ZIUbe4RMDEJzEOW70jWplP1KLi/0+4DMu65J1URr CCnaeorG60dzTaJ16Mlwu31akY/nZKdM2kAw3iT79lqF1AhXDcJJtMfVA/SwpuEX9/T7 vw1yLvLHyvyol6OfLL2tc5du83puD/awkIu1BrDMW/aX2UwiG0ZxLXzxNR9++jR/uoux IACbPVnZN8IZgKdrs3StJ2sp4n6f76Df4nzaqk50k88GkETnMwjzYR6BuSCANzfqmOZX 6iWwJjUZD+3+r0pAN3ra1I4qcKgBHxAnvnHGHC8bY7imURE69EXCiO/YMbsXYTDHCaDy UOPw== X-Gm-Message-State: AOAM533WC792SQtvYvhuB7S3on0suVRQ1SoJhoshFM3ofGBUJE670KTh HsnWDXh6zzikLeF++gWDG8o= X-Received: by 2002:a17:90b:4c03:b0:1d2:bc27:4e4c with SMTP id na3-20020a17090b4c0300b001d2bc274e4cmr3908470pjb.94.1651319088680; Sat, 30 Apr 2022 04:44:48 -0700 (PDT) Received: from ip-172-31-27-201.ap-northeast-1.compute.internal (ec2-18-183-95-104.ap-northeast-1.compute.amazonaws.com. [18.183.95.104]) by smtp.gmail.com with ESMTPSA id u14-20020a170902a60e00b0015e8d4eb28esm1289997plq.216.2022.04.30.04.44.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Apr 2022 04:44:48 -0700 (PDT) Date: Sat, 30 Apr 2022 11:44:43 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: Marco Elver , Matthew WilCox , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 04/23] mm/slab_common: cleanup kmalloc_track_caller() Message-ID: <20220430114441.GA24925@ip-172-31-27-201.ap-northeast-1.compute.internal> References: <20220414085727.643099-1-42.hyeyoo@gmail.com> <20220414085727.643099-5-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 26, 2022 at 05:49:08PM +0200, Vlastimil Babka wrote: > On 4/14/22 10:57, Hyeonggon Yoo wrote: > > Make kmalloc_track_caller() wrapper of kmalloc_node_track_caller(). > > > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > > --- > > include/linux/slab.h | 17 ++++++++--------- > > mm/slab.c | 6 ------ > > mm/slob.c | 6 ------ > > mm/slub.c | 22 ---------------------- > > 4 files changed, 8 insertions(+), 43 deletions(-) > > > > diff --git a/include/linux/slab.h b/include/linux/slab.h > > index a3b9d4c20d7e..acdb4b7428f9 100644 > > --- a/include/linux/slab.h > > +++ b/include/linux/slab.h > > @@ -639,6 +639,12 @@ static inline __alloc_size(1, 2) void *kcalloc(size_t n, size_t size, gfp_t flag > > return kmalloc_array(n, size, flags | __GFP_ZERO); > > } > > > > +extern void *__kmalloc_node_track_caller(size_t size, gfp_t flags, int node, > > + unsigned long caller) __alloc_size(1); > > Update: in v3 remove the extern, it's not necessary and the kernel is slowly > getting rid of them. Will do in v3. Thanks!