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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72001C433F5 for ; Tue, 25 Jan 2022 05:44:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D74B16B0083; Tue, 25 Jan 2022 00:44:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D245C6B0085; Tue, 25 Jan 2022 00:44:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C13326B0087; Tue, 25 Jan 2022 00:44:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id B3D366B0083 for ; Tue, 25 Jan 2022 00:44:08 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6F3148249980 for ; Tue, 25 Jan 2022 05:44:08 +0000 (UTC) X-FDA: 79067718576.16.5BECCDA Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf23.hostedemail.com (Postfix) with ESMTP id A23AB140007 for ; Tue, 25 Jan 2022 05:44:07 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C9071FB; Mon, 24 Jan 2022 21:44:06 -0800 (PST) Received: from [10.163.42.113] (unknown [10.163.42.113]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A17F73F7D8; Mon, 24 Jan 2022 21:44:03 -0800 (PST) Subject: Re: [PATCH v1] mm, hwpoison: remove obsolete comment To: Naoya Horiguchi , linux-mm@kvack.org Cc: Andrew Morton , Mike Kravetz , Tony Luck , Naoya Horiguchi , linux-kernel@vger.kernel.org References: <20220125025601.3054511-1-naoya.horiguchi@linux.dev> From: Anshuman Khandual Message-ID: Date: Tue, 25 Jan 2022 11:14:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20220125025601.3054511-1-naoya.horiguchi@linux.dev> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Stat-Signature: 91hb1ksz63tubksasaze38bmzsy1fsji X-Rspam-User: nil Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf23.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A23AB140007 X-HE-Tag: 1643089447-662892 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 1/25/22 8:26 AM, Naoya Horiguchi wrote: > From: Naoya Horiguchi > > With the introduction of mf_mutex, most of memory error handling > process is mutually exclusive, so the in-line comment about > subtlety about double-checking PageHWPoison is no more correct. > So remove it. > > Suggested-by: Mike Kravetz > Signed-off-by: Naoya Horiguchi > --- > mm/memory-failure.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index 4c9bd1d37301..a6a1e02759e7 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -2146,12 +2146,6 @@ static int __soft_offline_page(struct page *page) > .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL, > }; > > - /* > - * Check PageHWPoison again inside page lock because PageHWPoison > - * is set by memory_failure() outside page lock. Note that > - * memory_failure() also double-checks PageHWPoison inside page lock, > - * so there's no race between soft_offline_page() and memory_failure(). > - */ > lock_page(page); > if (!PageHuge(page)) > wait_on_page_writeback(page); > Reviewed-by: Anshuman Khandual