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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13E97C433EF for ; Wed, 27 Oct 2021 02:31:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9D98161074 for ; Wed, 27 Oct 2021 02:31:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9D98161074 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3DAEB80007; Tue, 26 Oct 2021 22:31:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 38B1C940007; Tue, 26 Oct 2021 22:31:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 27A1E80007; Tue, 26 Oct 2021 22:31:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 165F3940007 for ; Tue, 26 Oct 2021 22:31:32 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D36162C684 for ; Wed, 27 Oct 2021 02:31:31 +0000 (UTC) X-FDA: 78740641182.06.4E2CA4E Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf08.hostedemail.com (Postfix) with ESMTP id 5CDB93000255 for ; Wed, 27 Oct 2021 02:31:24 +0000 (UTC) Date: Wed, 27 Oct 2021 11:31:19 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1635301889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TSHBBsEnM48VfyIfqBXTjY8VZ85+5qmBADTRLB/oKUc=; b=KkowZlZAT4Ju0OiTaRS+W0CILr3V1kll9g/Hj9R7sQlwG5pzTNmcuDrOAQHewibbxaCnp0 9EhMSocz9hOf/jLMkIKh+FLtZmjwBYp1w7n6r7Swr7Fn/JFRf/PgD49Mp2tRokkZ2FUcpo NGzAwhfKacZE4Xf2bf72rm12DpsP8sM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Naoya Horiguchi To: Yang Shi Cc: Linux MM , Andrew Morton , David Hildenbrand , Oscar Salvador , Michal Hocko , Ding Hui , Tony Luck , "Aneesh Kumar K.V" , Miaohe Lin , Peter Xu , Naoya Horiguchi , Linux Kernel Mailing List Subject: Re: [PATCH v2 1/4] mm/hwpoison: mf_mutex for soft offline and unpoison Message-ID: <20211027023119.GC2707645@u2004> References: <20211025230503.2650970-1-naoya.horiguchi@linux.dev> <20211025230503.2650970-2-naoya.horiguchi@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: naoya.horiguchi@linux.dev X-Rspamd-Queue-Id: 5CDB93000255 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=KkowZlZA; spf=pass (imf08.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Stat-Signature: f1b5p34xyge37hn5mjyx9kaedadcpk3k X-Rspamd-Server: rspam06 X-HE-Tag: 1635301884-259719 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 Tue, Oct 26, 2021 at 06:32:36PM -0700, Yang Shi wrote: > On Mon, Oct 25, 2021 at 4:06 PM Naoya Horiguchi > wrote: > > > > From: Naoya Horiguchi > > > > Originally mf_mutex is introduced to serialize multiple MCE events, but > > it's also helpful to exclude races among soft_offline_page() and > > unpoison_memory(). So apply mf_mutex to them. > > My understanding is it is not that useful to make unpoison run > parallel with memory_failure() and soft offline, so they can be > serialized by mf_mutex and we could make the memory failure handler > and soft offline simpler. Thank you for the suggestion, this sounds correct and more specific. > > If the above statement is correct, could you please tweak this commit > log to reflect it with patch #2 squashed into this patch? Sure, I'm thinking of revising like below: Originally mf_mutex is introduced to serialize multiple MCE events, but it is not that useful to allow unpoison to run in parallel with memory_failure() and soft offline. So apply mf_they to soft offline and unpoison. The memory failure handler and soft offline handler get simpler with this. Thanks, Naoya Horiguchi