Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1982387pxb; Fri, 25 Mar 2022 09:04:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5Ozdr+dyoPFWQTk6i7NUN31PkvnYCZ9t8E4/xUGisI141BfKBzdWGA3mGQpFeN0j1HMuG X-Received: by 2002:a63:2316:0:b0:381:ac6:94a5 with SMTP id j22-20020a632316000000b003810ac694a5mr214697pgj.501.1648224249128; Fri, 25 Mar 2022 09:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648224249; cv=none; d=google.com; s=arc-20160816; b=s3psKEdPOa1+puj6tGnFirfrm3xnvPKX3h1OJ9k5AEZZbcQyR7H2jcr+fnFaoW6fxF MZq/i2ap3werOb9pwVspZtfMvs34m5JY6T8TbVgu1mpcM0ub+D+5YxMadcJ35jpBkUIa A0uS/es2QxjDwUbTDxR6skK1+Qxt/4nuGm+HumWSpfXq10uBFSFhkqK+uheJqZiQOkgi 68i6Woe4vgi6YcBFdVDFp0xbxFWvmHzhPNiR5Hgo5rHxBmWnGsf7iWwwc+rbIANg0kHQ dDjR7iz7L+ybK7iLstOo4oKC1Ymq1+tns3RTcpjkaRzHk69PScNumqRNAIerWRPZsFNx B62w== 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=HGT7Uj6/EhveXkVwghH4LYAenDJ1TyPCjNeutemup5s=; b=BMK/4T1wcIjfsfZM4u8WxtW6n6JNwYjdXFPtoSOE/oPS/vMfIvAqwle92YQ1TXZwXo hHoTlOIRjVAeWpBYVZg756mZwrgjdLFc1sjkWL8fCTM3NVEf/ZsMsUgeYsbXvXFAsQDv 9OvljQTWLkDIMJVdnYuQSArd2qJGpADltikkfocXE/iilWo6umnOhGSKNO1S1hhnrYkq SoU5YSFLgkSIWNlhN9EnLrVVjG2AltKU/HRflOcuyFz0HqjxUwPXcW2EOzuE9FsmfyCg wWU4LsynIHlUwJJUW6uFFHgIQNuadFvde/ndYjMc69L8X8Qnc/x/XTARRyUfIDGslwSJ i4Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=HQzImj5R; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=bKV0Fwya; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u206-20020a6279d7000000b004fa92f4725dsi3035481pfc.32.2022.03.25.09.03.53; Fri, 25 Mar 2022 09:04:09 -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=@suse.cz header.s=susede2_rsa header.b=HQzImj5R; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=bKV0Fwya; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348588AbiCXRYa (ORCPT + 99 others); Thu, 24 Mar 2022 13:24:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240571AbiCXRY2 (ORCPT ); Thu, 24 Mar 2022 13:24:28 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0228F986F6 for ; Thu, 24 Mar 2022 10:22:56 -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-out1.suse.de (Postfix) with ESMTPS id 98A27215FD; Thu, 24 Mar 2022 17:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1648142574; 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=HGT7Uj6/EhveXkVwghH4LYAenDJ1TyPCjNeutemup5s=; b=HQzImj5RZ4tBMpz4HqGSXrKSVTkS8nHvI8XO2MB65609assGuxUYVPCz40M5Ovk6NmFook U7dCxBVS6jWjhhVnfy4ZOSgnDkAqYx5eUl8ZDiJmHxBpVVoqbjqMY8hGmt5dFVh0di7vLQ t9nJfu2lAjAJONY+ukZ77nhKETGTJgM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1648142574; 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=HGT7Uj6/EhveXkVwghH4LYAenDJ1TyPCjNeutemup5s=; b=bKV0Fwya9p1PnCxvArPKuyctqOZ/8wV6lwKLs9LYMyshmhW6dcNJ7B5XzmFqQAohBIGslL vV3f2Jo3Xa4KdjBQ== 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 674EC13A7F; Thu, 24 Mar 2022 17:22:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EqBvGO6oPGLaWAAAMHmgww (envelope-from ); Thu, 24 Mar 2022 17:22:54 +0000 Message-ID: Date: Thu, 24 Mar 2022 18:22:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC PATCH v1 05/15] mm/slub: move kmalloc_large_node() to slab_common.c Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Marco Elver , Matthew WilCox , Roman Gushchin , linux-kernel@vger.kernel.org References: <20220308114142.1744229-1-42.hyeyoo@gmail.com> <20220308114142.1744229-6-42.hyeyoo@gmail.com> From: Vlastimil Babka In-Reply-To: <20220308114142.1744229-6-42.hyeyoo@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 3/8/22 12:41, Hyeonggon Yoo wrote: > In later patch SLAB will also pass requests larger than order-1 page > to page allocator. Move kmalloc_large_node() to slab_common.c. > > Fold kmalloc_large_node_hook() into kmalloc_large_node() as there is > no other caller. > > Move tracepoint in kmalloc_large_node(). > > Add flag fix code. This exist in kmalloc_large() but omitted in > kmalloc_large_node(). > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > --- > include/linux/slab.h | 3 +++ > mm/slab_common.c | 26 ++++++++++++++++++++++++ > mm/slub.c | 47 ++++---------------------------------------- > 3 files changed, 33 insertions(+), 43 deletions(-) > > > @@ -4874,15 +4842,8 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, > struct kmem_cache *s; > void *ret; > > - if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) { > - ret = kmalloc_large_node(size, gfpflags, node); > - > - trace_kmalloc_node(caller, ret, > - size, PAGE_SIZE << get_order(size), > - gfpflags, node); Hmm this throws away the caller for tracing, so looks like an unintended functional change. > - > - return ret; > - } > + if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) > + return kmalloc_large_node(size, gfpflags, node); > > s = kmalloc_slab(size, gfpflags); >