Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4420557ioa; Wed, 27 Apr 2022 03:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUY/RKfVrwCtBwEDv06DzeHAi9QJn0z8uVFyr1vtEAIj0vc32w0bkayYu1LknwSiBDgzth X-Received: by 2002:a17:90b:4a8a:b0:1d2:bff4:b44f with SMTP id lp10-20020a17090b4a8a00b001d2bff4b44fmr42800797pjb.118.1651055664963; Wed, 27 Apr 2022 03:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055664; cv=none; d=google.com; s=arc-20160816; b=E8qJoEag8fuecl2cflQ5tfiNbNakohDxeR+oldLxcnIpYsEx3m+JHEL7ZIvstCrjMr O6H8M9uEfNt/GTFRU23MO2eRQ1KUyenpj7ccaWc3eivTwyjncbkA77ErcU/BWi8Gw+yP B0vNrsGOJCXPhK6k4mQ2p+QP4DkCq2Gm+vHfjq5WiTavx5Ma5igfhnaXsUhi6XMrE3Wb TagiZICg3yuYkadqS+jCsA/A43it0UN49+pr540csid5mZQPLaF9xa0Qu5KesatvFD7R B9zmqZxeo/SNhtMkrhE19YagQRwbiNROoklMDKBI3KGGMCNy0/se6qXqzAmgHFwT6GEQ X/uw== 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:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=rhUCnfLaLVR3gKOvJDs3VsH1Owqoy0EyHHUnNelrzz8=; b=Y8jIZuzp277j75X0UEUs2ApzXFU/9nj0vtMI4DDC+0uaBXkzaG2CcEd4G8/mJeyqnd r52FN2qNEqE29QAlI2CAA30g1znlhxeRZbXQsN5R7EAWUxS84xv5SQhsYrRhv61eAJ26 YhDrjk7D1Sm0duvk6mD3/KKqOGfbqlUsP2vzwRFZsmV5JFKFeNsQ9eMPXihFm+X1hzO3 Bci9lAQVzEGk+QO/s5cOMP0ft0+OqhZCY8ETM/3oR6kTbEVe15BERi9BpSj7V5F5Gp8D mCDf2XJCjVi3gG79cm16GZ5jpUI38Ugc2USIxz7UoS6fQvoZ+YkgfamFfnxzoVZMX4rw KllA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=FUeN2KN3; dkim=neutral (no key) header.i=@suse.cz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 192-20020a6301c9000000b003ab1f0ad455si1093305pgb.524.2022.04.27.03.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:34:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=FUeN2KN3; dkim=neutral (no key) header.i=@suse.cz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B78F3BC458; Wed, 27 Apr 2022 02:47:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243652AbiDZQFa (ORCPT + 99 others); Tue, 26 Apr 2022 12:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237871AbiDZQF1 (ORCPT ); Tue, 26 Apr 2022 12:05:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB2EF42EE7 for ; Tue, 26 Apr 2022 09:02:19 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8897A1F388; Tue, 26 Apr 2022 16:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1650988938; h=from:from:reply-to: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=rhUCnfLaLVR3gKOvJDs3VsH1Owqoy0EyHHUnNelrzz8=; b=FUeN2KN3Y4LRX09Snuy+dqHQLQ7yIRxsLMnO5Xbopwj20SsLx+EyN00Oq6CsX/hOrTPlWQ RKhhw5M4zO/Y2IqILzvDiqRTeuCQ0jj154pY4kuSNmzXXzWrk5Tej1UZlDMCECF/Bo48kI D9Bz39BV7K3LNRhIEpkcrNg1rOGUWRc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1650988938; h=from:from:reply-to: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=rhUCnfLaLVR3gKOvJDs3VsH1Owqoy0EyHHUnNelrzz8=; b=Ztj4sEhh40VCp+3uJZbgUl8r3xxZ1oZvtgm3dkbgOWZ2UL5dSgmcWVHtmMEp7dCcxaOspJ o3HFSBNnOVPlYfBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5E57013223; Tue, 26 Apr 2022 16:02:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id X2dWFooXaGIBdgAAMHmgww (envelope-from ); Tue, 26 Apr 2022 16:02:18 +0000 Message-ID: <768d4216-232e-6c67-b395-83c2f34c7970@suse.cz> Date: Tue, 26 Apr 2022 18:02:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2 05/23] mm/slab_common: cleanup __kmalloc() Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com> 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 References: <20220414085727.643099-1-42.hyeyoo@gmail.com> <20220414085727.643099-6-42.hyeyoo@gmail.com> From: Vlastimil Babka In-Reply-To: <20220414085727.643099-6-42.hyeyoo@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 4/14/22 10:57, Hyeonggon Yoo wrote: > Make __kmalloc() wrapper of __kmalloc_node(). Again/similarly, looks like this will make SLUB not miss trace for kmalloc_large() anymore. > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Vlastimil Babka Nit below: > --- > include/linux/slab.h | 13 ++++++++++--- > mm/slab.c | 34 ---------------------------------- > mm/slob.c | 6 ------ > mm/slub.c | 23 ----------------------- > 4 files changed, 10 insertions(+), 66 deletions(-) > > diff --git a/include/linux/slab.h b/include/linux/slab.h > index acdb4b7428f9..4c06d15f731c 100644 > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -419,7 +419,16 @@ static __always_inline unsigned int __kmalloc_index(size_t size, > #define kmalloc_index(s) __kmalloc_index(s, true) > #endif /* !CONFIG_SLOB */ > > -void *__kmalloc(size_t size, gfp_t flags) __assume_kmalloc_alignment __alloc_size(1); > +extern void *__kmalloc_node(size_t size, gfp_t flags, int node) > + __assume_kmalloc_alignment > + __alloc_size(1); > + Again, no 'extern' please. > +static __always_inline __alloc_size(1) __assume_kmalloc_alignment > +void *__kmalloc(size_t size, gfp_t flags) > +{ > + return __kmalloc_node(size, flags, NUMA_NO_NODE); > +} > + > void *kmem_cache_alloc(struct kmem_cache *s, gfp_t flags) __assume_slab_alignment __malloc; > void *kmem_cache_alloc_lru(struct kmem_cache *s, struct list_lru *lru, > gfp_t gfpflags) __assume_slab_alignment __malloc;