Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1353325pxf; Fri, 2 Apr 2021 08:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3mEUPn06CCpDLRq0QoHY9XmoQG3+WVRyeXWN7vFF67uUVIp8ssgAAFY3TtHMSz45C3nc8 X-Received: by 2002:a05:6402:484:: with SMTP id k4mr15720462edv.321.1617376467087; Fri, 02 Apr 2021 08:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617376467; cv=none; d=google.com; s=arc-20160816; b=ZQhRHoIl5I0Za1WeS1ug0FMmCvpm5IFJ/qw3AjPCbmcjLqLsQWarI6B+NwbMElVfjZ cthH348BqiJMLO4/2+VjmmYR666lKTLP9Kh6yhEt/utMcWIDzTOzdBX9MbkZYPLSV+A3 xmcwiKXCzDO6Lmoc6Yo7yT1ccbpvH8xXqH1ybCXWCp20Bcn+DmYC8ZjQFO0ic+yG2jvQ KnB43Hq2h9VKH8Nqx2QQNiyNmvHS/3Raf8fNyhcRzGQVhbAMgqoS6kEpprmhqYwHYoQo 8GJvqy9M3wrWavbrtWalt03chol1ZBpC9aFfk97nv3k2Bub0M+v1VxPgKaSOUIWCzWYX AAqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=tZKEngr/BkG354g5y1Mq/fHLo3yyICj0ihT/4cUzezE=; b=nN89/wudnqpF/TGbNF6EvMhEEwf9+aeGAqTRBm3G3x786J0iW+NaNbDGf43eHf69sb S8YOA5t2aKPOBQtcxXfJd8rVTFwJitw9bj76Gxccwm+u3emhHsTkLmUErToKyglJYNhs hyWR4DGn4Al/i8battkhybzZSJWXD/qLRp2wsI1ZRyOMNLzQNjsEVehxpIxyNLBxTVt+ +g4U8MvF9b5SBg5DcFl/y3ZJU3Et7KQmSfkLzKLEyygbPbVEU6oHO4ySoOtDVkBCr1vu 2/RqN22XnP950PMA/qmHHIYqWpeEuSQamhqATPmbT8RVZ2cJBj4N/w3LAx2In0QY2/2r GRZA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov28si1143281ejb.96.2021.04.02.08.14.03; Fri, 02 Apr 2021 08:14:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234775AbhDBPL0 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 2 Apr 2021 11:11:26 -0400 Received: from mga01.intel.com ([192.55.52.88]:27466 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbhDBPLX (ORCPT ); Fri, 2 Apr 2021 11:11:23 -0400 IronPort-SDR: VIbJHzIj600z04xqEBnV6sh94IlLTia97pCFb1pdi5fLsRR/p7dMlAH4phchGa3PgECxm8K4aj rKjdBC+ohU+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9942"; a="212756582" X-IronPort-AV: E=Sophos;i="5.81,300,1610438400"; d="scan'208";a="212756582" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 08:11:21 -0700 IronPort-SDR: fDNVDH0s3pRZwuZZRDpNaxmawZyua+kIM+3N6rO31ooJ3nLmn+J30Tq1KdeHF8HZUg4qx25qdh GhlHU9XaBOOQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,300,1610438400"; d="scan'208";a="446822902" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga002.fm.intel.com with ESMTP; 02 Apr 2021 08:11:21 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 2 Apr 2021 08:11:21 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 2 Apr 2021 08:11:21 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2106.013; Fri, 2 Apr 2021 08:11:21 -0700 From: "Luck, Tony" To: Aili Yao CC: =?iso-2022-jp?B?SE9SSUdVQ0hJIE5BT1lBKBskQktZOH0hIUQ+TGkbKEIp?= , Oscar Salvador , "david@redhat.com" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "yangfeng1@kingsoft.com" , "sunhao2@kingsoft.com" Subject: RE: [PATCH v3] mm,hwpoison: return -EHWPOISON when page already poisoned Thread-Topic: [PATCH v3] mm,hwpoison: return -EHWPOISON when page already poisoned Thread-Index: AQHXJiCcYSfsREicYE+l/w+vDcmt1aqfzHoAgAEYvwCAAHK6QA== Date: Fri, 2 Apr 2021 15:11:20 +0000 Message-ID: References: <20210305093656.6c262b19@alex-virtual-machine> <20210305221143.GA220893@agluck-desk2.amr.corp.intel.com> <20210308064558.GA3617@hori.linux.bs1.fc.nec.co.jp> <3690ece2101d428fb9067fcd2a423ff8@intel.com> <20210308223839.GA21886@hori.linux.bs1.fc.nec.co.jp> <20210308225504.GA233893@agluck-desk2.amr.corp.intel.com> <20210309100421.3d09b6b1@alex-virtual-machine> <20210309060440.GA29668@hori.linux.bs1.fc.nec.co.jp> <20210309143534.6c1a8ec5@alex-virtual-machine> <20210331192540.2141052f@alex-virtual-machine> <20210401153320.GA426964@agluck-desk2.amr.corp.intel.com> <20210402091820.04d7c3e0@alex-virtual-machine> In-Reply-To: <20210402091820.04d7c3e0@alex-virtual-machine> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> Combined with my "mutex" patch (to get rid of races where 2nd process returns >> early, but first process is still looking for mappings to unmap and tasks >> to signal) this patch moves forward a bit. But I think it needs an >> additional change here in kill_me_maybe() to just "return" if there is a >> EHWPOISON return from memory_failure() >> > Got this, Thanks for your reply! > I will dig into this! One problem with this approach is when the first task to find poison fails to complete actions. Then the poison pages are not unmapped, and just returning from kill_me_maybe() gets into a loop :-( -Tony