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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 146E5C48BE5 for ; Sat, 12 Jun 2021 10:07:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8B46361374 for ; Sat, 12 Jun 2021 10:07:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B46361374 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2038A6B006C; Sat, 12 Jun 2021 06:07:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B1E86B006E; Sat, 12 Jun 2021 06:07:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 079C26B0070; Sat, 12 Jun 2021 06:07:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id CB7D46B006C for ; Sat, 12 Jun 2021 06:07:11 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 58200181AF5C4 for ; Sat, 12 Jun 2021 10:07:11 +0000 (UTC) X-FDA: 78244643862.28.AD473BA Received: from outbound-smtp50.blacknight.com (outbound-smtp50.blacknight.com [46.22.136.234]) by imf25.hostedemail.com (Postfix) with ESMTP id 51A4F6000141 for ; Sat, 12 Jun 2021 10:07:04 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp50.blacknight.com (Postfix) with ESMTPS id A53D7FACB5 for ; Sat, 12 Jun 2021 11:07:08 +0100 (IST) Received: (qmail 3549 invoked from network); 12 Jun 2021 10:07:08 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 12 Jun 2021 10:07:08 -0000 Date: Sat, 12 Jun 2021 11:07:06 +0100 From: Mel Gorman To: Andrew Morton Cc: Zi Yan , Dave Hansen , Vlastimil Babka , Michal Hocko , Jesper Dangaard Brouer , LKML , Linux-MM Subject: Re: [PATCH v2] mm/page_alloc: Allow high-order pages to be stored on the per-cpu lists Message-ID: <20210612100706.GE30378@techsingularity.net> References: <20210611135753.GC30378@techsingularity.net> <20210611162331.272f67eabffa491fc83798b4@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210611162331.272f67eabffa491fc83798b4@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.234 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 51A4F6000141 X-Stat-Signature: qh771uyshy8d6z1qidskxdzfkeay1gk7 X-HE-Tag: 1623492424-714722 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 Fri, Jun 11, 2021 at 04:23:31PM -0700, Andrew Morton wrote: > > +static inline int pindex_to_order(unsigned int pindex) > > +{ > > + int order = pindex / MIGRATE_PCPTYPES; > > + > > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > > + if (order > PAGE_ALLOC_COSTLY_ORDER) { > > + order = pageblock_order; > > + VM_BUG_ON(order != pageblock_order); > > Somebody has trust issues? > Just a little bit :P > > + } > > +#else > > + VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); > > +#endif > > + > > + return order; > > +} > > Do we really need all these assertions, long-term? > No, definitely not. Even now it's but already the patch caught me by surprise (breaking kvm boot) so I'd like to leave them in for at least one release given the number of changes queued in your tree for the next merge window. Thanks. -- Mel Gorman SUSE Labs