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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 C9DE5C47E48 for ; Thu, 15 Jul 2021 14:05:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6E41B61289 for ; Thu, 15 Jul 2021 14:05:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E41B61289 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 A3F928D00D5; Thu, 15 Jul 2021 10:05:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EFC28D00CD; Thu, 15 Jul 2021 10:05:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 890068D00D5; Thu, 15 Jul 2021 10:05:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 612A58D00CD for ; Thu, 15 Jul 2021 10:05:46 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 40E58138E5 for ; Thu, 15 Jul 2021 14:05:45 +0000 (UTC) X-FDA: 78364995450.37.549339C Received: from outbound-smtp22.blacknight.com (outbound-smtp22.blacknight.com [81.17.249.190]) by imf16.hostedemail.com (Postfix) with ESMTP id 8485AF00008E for ; Thu, 15 Jul 2021 14:05:44 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp22.blacknight.com (Postfix) with ESMTPS id 1666F14803F for ; Thu, 15 Jul 2021 15:05:43 +0100 (IST) Received: (qmail 4167 invoked from network); 15 Jul 2021 14:05:42 -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); 15 Jul 2021 14:05:42 -0000 Date: Thu, 15 Jul 2021 15:05:41 +0100 From: Mel Gorman To: ?????? Cc: Andrew Morton , Alexander Lobakin , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel@vivo.com, syzbot+b07d8440edb5f8988eea@syzkaller.appspotmail.com, Wang Qing Subject: Re: Re: [PATCH v2] mm/page_alloc: fix alloc_pages_bulk/set_page_owner panic on irq disabled Message-ID: <20210715140541.GT3809@techsingularity.net> References: <20210715115731.GS3809@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8485AF00008E X-Stat-Signature: 13qm7n7eknp1f4bn3k4ygs5bi1cbf6c3 Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.190 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-HE-Tag: 1626357944-478529 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 Thu, Jul 15, 2021 at 09:02:14PM +0800, ?????? wrote: > >> Fixes: 0f87d9d30f21 ("mm/page_alloc: add an array-based interface to the bulk page allocator") > >> Reported-by: syzbot+b07d8440edb5f8988eea@syzkaller.appspotmail.com > >> Suggested-by: Wang Qing > >> Signed-off-by: Yang Huan > > > >https://lore.kernel.org/lkml/20210713152100.10381-2-mgorman@techsingularity.net/ > >is now part of a series that has being sent to Linus. Hence, the Fixes > >part is no longer applicable and the patch will no longer be addresing > >an atomic sleep bug. This patch should be treated as an enhancement > > Hi Mel Gorman, thanks for your reply. > I see the fix patch, it fix this bug by abandon alloc bulk feature when page_owner is set. > But in my opinion, it can't really fix this bug, it's a circumvention plan. Yes, it's a circumvention plan for reasons as laid out in the changelog. > >to allow bulk allocations when PAGE_OWNER is set. For that, it should > >include a note on the performance if PAGE_OWNER is used with either NFS > >or high-speed networking to justify the additional complexity. > > My patch just split the prep_new_page page_gfp into alloc_gfp(for alloc bulk is GFP_ATOMIC, > for other's no change) and trace page gfp. So, we will not use the error way to get memory. > So, I think this will not affect alloc bulk performance when page_owner is on(compare with origin patch) but > can really fix this bug rather than evade. > And this patch can let alloc bulk feature and page_owner feature work togher > So, I will send patch again based on the fix patch. Your fix should revert the workaround. Also your changelog should note that in some cases that PAGE_OWNER information will be lost if the GFP_ATOMIC allocation from bulk allocation context fails. -- Mel Gorman SUSE Labs