From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF9EDC433ED for ; Sat, 8 May 2021 23:20:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EB045613FA for ; Sat, 8 May 2021 23:20:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB045613FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1E3846B0071; Sat, 8 May 2021 19:20:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 194506B0073; Sat, 8 May 2021 19:20:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 034976B0074; Sat, 8 May 2021 19:20:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id DCD5A6B0071 for ; Sat, 8 May 2021 19:20:22 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 92C62180AD83E for ; Sat, 8 May 2021 23:20:22 +0000 (UTC) X-FDA: 78119634684.20.69265EE Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 24950A00038A for ; Sat, 8 May 2021 23:20:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=MgGM9LaDhzqC2AUWraDRKJjmwAHl2LHVlB1VPC4+S+w=; b=HHideBd3E0a6pv3Cr6H1zLetvE P5c/OKmy5+xtQcVqDqs5FHRAhi6WBRCg4yrNjRFcTND4Y44mYPcEirPGw3LUVGH2aM15unXtBOm7r ybV4Hc1ASGae7IFSg2cDJIZ+7I18HWvCPQKWT+amufcWaFY3h1XU65JCKG0FMiLSfLWmCpoeRjflX uTWVjAc7P8qzUvu4cQ/bGgq0zZ50oVmjsOpyl5hsQ5I9ROZTHxZQtxS3jT1FyRLk826sVjswWs3s2 eueSYTwnhHKGsM+fSxW3RmiUq/Z2GIkhbjwruFLppyJw4a+PlHxesDECMNbqgQ1FWm5A9JEdCxbvz 3RQD9yhw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lfWEW-004dVU-9G; Sat, 08 May 2021 23:19:43 +0000 Date: Sun, 9 May 2021 00:19:40 +0100 From: Matthew Wilcox To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: kmalloc_index: remove case when size is more than 32MB Message-ID: References: <20210508221328.7338-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210508221328.7338-1-42.hyeyoo@gmail.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 24950A00038A Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=HHideBd3; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: pmb6eqy76pimscuk4j5juwkmr86er7af Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf07; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620516019-123689 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, May 09, 2021 at 07:13:28AM +0900, Hyeonggon Yoo wrote: > the return value of kmalloc_index is used as index of kmalloc_caches, it doesn't matter. every few weeks somebody posts a patch to "optimise" kmalloc_index, failing to appreciate that it's only ever run at compile time because it's all under __builtin_constant_p().