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.2 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 754C6C43462 for ; Mon, 12 Apr 2021 11:19:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F078A61352 for ; Mon, 12 Apr 2021 11:19:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F078A61352 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 78C816B0036; Mon, 12 Apr 2021 07:19:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 73CB06B006C; Mon, 12 Apr 2021 07:19:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 606356B006E; Mon, 12 Apr 2021 07:19:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0201.hostedemail.com [216.40.44.201]) by kanga.kvack.org (Postfix) with ESMTP id 414EE6B0036 for ; Mon, 12 Apr 2021 07:19:57 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DC9FB75A6 for ; Mon, 12 Apr 2021 11:19:56 +0000 (UTC) X-FDA: 78023470392.08.22BDDCB Received: from outbound-smtp14.blacknight.com (outbound-smtp14.blacknight.com [46.22.139.231]) by imf02.hostedemail.com (Postfix) with ESMTP id B29A140002DD for ; Mon, 12 Apr 2021 11:19:40 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp14.blacknight.com (Postfix) with ESMTPS id 2D7B31C52A7 for ; Mon, 12 Apr 2021 12:19:53 +0100 (IST) Received: (qmail 30339 invoked from network); 12 Apr 2021 11:19:52 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 12 Apr 2021 11:19:52 -0000 Date: Mon, 12 Apr 2021 12:19:51 +0100 From: Mel Gorman To: Vlastimil Babka Cc: Andrew Morton , Chuck Lever , Jesper Dangaard Brouer , Christoph Hellwig , Alexander Duyck , Matthew Wilcox , Ilias Apalodimas , LKML , Linux-Net , Linux-MM , Linux-NFS Subject: Re: [PATCH 2/9] mm/page_alloc: Add a bulk page allocator Message-ID: <20210412111951.GW3697@techsingularity.net> References: <20210325114228.27719-1-mgorman@techsingularity.net> <20210325114228.27719-3-mgorman@techsingularity.net> <28729c76-4e09-f860-0db1-9c79c8220683@suse.cz> <20210412105938.GU3697@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210412105938.GU3697@techsingularity.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: n3txgfwmrxxy9t4yzkci6cc9n3g165ze X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B29A140002DD Received-SPF: none (techsingularity.net>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=outbound-smtp14.blacknight.com; client-ip=46.22.139.231 X-HE-DKIM-Result: none/none X-HE-Tag: 1618226380-673692 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 Mon, Apr 12, 2021 at 11:59:38AM +0100, Mel Gorman wrote: > > I don't understand this comment. Only alloc_flags_nofragment() sets this flag > > and we don't use it here? > > > > It's there as a reminder that there are non-obvious consequences > to ALLOC_NOFRAGMENT that may affect the bulk allocation success > rate. __rmqueue_fallback will only select pageblock_order pages and if that > fails, we fall into the slow path that allocates a single page. I didn't > deal with it because it was not obvious that it's even relevant but I bet > in 6 months time, I'll forget that ALLOC_NOFRAGMENT may affect success > rates without the comment. I'm waiting for a bug that can trivially trigger > a case with a meaningful workload where the success rate is poor enough to > affect latency before adding complexity. Ideally by then, the allocation > paths would be unified a bit better. > So this needs better clarification. ALLOC_NOFRAGMENT is not a problem at the moment but at one point during development, it was a non-obvious potential problem. If the paths are unified, ALLOC_NOFRAGMENT *potentially* becomes a problem depending on how it's done and it needs careful consideration. For example, it could be part unified by moving the alloc_flags_nofragment() call into prepare_alloc_pages because in __alloc_pages, it always happens and it looks like an obvious partial unification. Hence the comment "May set ALLOC_NOFRAGMENT" because I wanted a reminder in case I "fixed" this in 6 months time and forgot the downside. -- Mel Gorman SUSE Labs