Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp598905pxb; Wed, 27 Oct 2021 08:47:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJku3Liv6d/z2fxDl9i5BTH3SgzBZM27pa56tkYj5Nn5a0/bSxjQ6i/i045mOLPJRpBzdF X-Received: by 2002:a05:6402:120b:: with SMTP id c11mr45514991edw.397.1635349655267; Wed, 27 Oct 2021 08:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635349655; cv=none; d=google.com; s=arc-20160816; b=cpVoX7EEM+otWjPDS1zFIKKNwAuVkM+lk5TYS+v1wjTjylzvLtgiDzf/SZToCQKeyE /HtQipedU4ZUH4XrOEDHCu/RD0VeiN4gpwnhRGWfRtM0lUKjBOD4BruIzHS0zcNc9JMU 7I+kMZmn7rteOGWw2R3SFJflHo0hFAeD8HIwt2OuUt4AEGawMnsBBlGeuMcI5Rj9hYs1 jZ5otKbi/ZdeHVS1r29jypITkLu7EixqVZOltpDuziRi5SqW4oUmO5TmSqPSFMRIArWB Pg//d5aaIjosZEFK5F2mck2cq2D3OoepV5MY2FrV1V8lJVGu57PuoCmwIYSfEErm9KJf rkgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=TSHBBsEnM48VfyIfqBXTjY8VZ85+5qmBADTRLB/oKUc=; b=dTjdqKEpO6FOw8yrEUi6dEw9jOkNEqVyLo8dpONvwVTa0egc429xLcfXyXEOcVY8k0 z6UP5JPJXGT2clRJbz5aAFq54JZNhI0N7c8gAZJS/ENL6Rpi/sYzdaEAB6b/L5yo3EMU HojO21rnY/dTUjzN52MCkyuE2MrkDpPIFwuA7PRj5GQ37IXYnN7nyDHYADyF+JR6nLUc 4I80YdqkEzCL5KLTEKqBEX6WSKwxAUMvH28ul3x5aQofzCxyMW/W/aYhCpz92jtFqFv1 i4xr5PekqoD3tHPqBvKs70Ins+PZ3DaE54wBB8wuQigWLkIj6VVZWjYHRQeEgcuXIhJC 9Iow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KkowZlZA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz30si272928ejc.667.2021.10.27.08.47.09; Wed, 27 Oct 2021 08:47:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KkowZlZA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237886AbhJ0Cd4 (ORCPT + 99 others); Tue, 26 Oct 2021 22:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbhJ0Cdz (ORCPT ); Tue, 26 Oct 2021 22:33:55 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1740FC061570 for ; Tue, 26 Oct 2021 19:31:31 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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