Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4154182pxj; Tue, 25 May 2021 01:25:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4ihRK77YQ3ILQytz0sIxJ1KbdDuAwhC+l0wN0DtT3aSWARUHNjqTVMZfTjQDw2Xg4zRYE X-Received: by 2002:a92:6e01:: with SMTP id j1mr22455942ilc.160.1621931121579; Tue, 25 May 2021 01:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621931121; cv=none; d=google.com; s=arc-20160816; b=YyaqxLVLn+u4P4/cmmjatkqNJvMIn8EfY+kRmDrFAL2EzeMwynIv8h3d8/Lg9g5i56 /lgSZSntrCkRtftpQP/iAT7TprJWBhF7JWRo+3IV0d0wtsfbknQoLUzP6ty7JzSdwKJ7 kMAUKuqqSySZkkDUJ3Szd7EjDDBcx99UUbGGsQIQlZ2HrrgVxbEK3X6xl/81K09vrl5P vZ//XrfiFDw/MwYVxPOBXw2R3e8tMi4WFNSMlWQ13qeHrImltQtFETmF2n+eF5Mi0MJL YT2QZ8mEbL+KQEgGheYnC3qASdnF3gv+hUCHkm+p7cVIl5JjnD1l+IsHBvQWT5G3G2zz LtPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=9GKSyZSfAzVVq/ABR755e8Z5pcs9qhohd3YV/i12YGw=; b=GgHxSDt1hz1wghZWQbeohUXa8Xj9pGcqg4kYWL1ohnoPyrXSgAKbvKhz0u9nKOjwhE gs/7Gw2hCFxJMQAmC3V0z9LlzOG22B5C3cII1N5e8OhEuJW3inPrS9cfD3XssEt+L2El URMR51uSbyxnfM3JwR4Asw2d1p0PfkVZy04+UrYxCQHxWKkAf5o06LewzT8BPnhIP9CW PA1lIDnpObwtgxHTnQfI6s9rV29K7rwObWSAZtcUyGW+n/G0HAp/msNyUUy2kARi5YV3 AkpgsjpCiCOE2Zfsy7SZszBCCUvc26YjHknhd7JxnuQ9pQibV2skBuoSiJqDuohxIZAe bwMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ets6WZ9Y; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=aeKZOMiC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si18646025jat.35.2021.05.25.01.25.08; Tue, 25 May 2021 01:25:21 -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=@suse.de header.s=susede2_rsa header.b=Ets6WZ9Y; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=aeKZOMiC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231713AbhEYHhj (ORCPT + 99 others); Tue, 25 May 2021 03:37:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:54852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbhEYHhi (ORCPT ); Tue, 25 May 2021 03:37:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1621928168; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9GKSyZSfAzVVq/ABR755e8Z5pcs9qhohd3YV/i12YGw=; b=Ets6WZ9YpTAvqq0ts49H1xJxPreCOpST9tTB/7sbHHhNZ424zNR6YJQZ9RCdidUReKkiYO lQBUIiq4cyuztVT/npnNNGCkNEYZ/NdkyTstGowh9N4za3CORvckFY+WPc495xGloLJp2H D4PbSA4WmMBbFY3CDaj14j45qFpn6Ts= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1621928168; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9GKSyZSfAzVVq/ABR755e8Z5pcs9qhohd3YV/i12YGw=; b=aeKZOMiCUet47hEHrHbJHkL4ltgc2DqW9DLkrsIl/zsZ/7FjFfxJX2m9YvmF8xwYEsld9u zc72a02lfs1kQ1Cg== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4FB9CAE99; Tue, 25 May 2021 07:36:08 +0000 (UTC) Date: Tue, 25 May 2021 09:36:05 +0200 From: Oscar Salvador To: HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+j44CA55u05LmfKQ==?= Cc: Mike Kravetz , Naoya Horiguchi , Muchun Song , "linux-mm@kvack.org" , Andrew Morton , Michal Hocko , Tony Luck , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 1/2] mm,hwpoison: fix race with hugetlb page allocation Message-ID: <20210525073559.GA844@linux> References: <20210518231259.2553203-1-nao.horiguchi@gmail.com> <20210518231259.2553203-2-nao.horiguchi@gmail.com> <20210520071717.GA2641190@hori.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210520071717.GA2641190@hori.linux.bs1.fc.nec.co.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 20, 2021 at 07:17:17AM +0000, HORIGUCHI NAOYA(堀口 直也) wrote: > So I think of inserting the check to comply with the assumption of > get_hwpoison_huge_page() like below: > > ret = get_hwpoison_huge_page(head, &hugetlb); > if (hugetlb) > return ret; > > if (!PageLRU(head) && !__PageMovable(head)) > return 0; > > if (PageTransHuge(head)) { > ... > } > > if (get_page_unless_zero(head)) { > ... > } > > return 0; Hi Naoya, would you mind posting a complete draft of what it would look like? I am having a hard time picturing it. Thanks -- Oscar Salvador SUSE L3