Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp273706imm; Tue, 21 Aug 2018 19:27:04 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxcqiwIDlyLWD1KFRMSPhTax+JVYzA7wNelnG/UNFJsTz9nZ0jXvCmC0H1NQyWI/spPvDSP X-Received: by 2002:a62:5ec3:: with SMTP id s186-v6mr50436208pfb.146.1534904824233; Tue, 21 Aug 2018 19:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534904824; cv=none; d=google.com; s=arc-20160816; b=08NYWpN2tgaPRIGZgPLYde1jBq4VkcpvZ0nqmZFE94Q56Jgf/W309jAF2yq445/zwF ZFjps5XRlewoF+okLSRfw/rY5vCvjirpakJUgWeAR8j6DN7AD9ttm1v2M0m+ze37kDep h2H2JADE6pQqtjIAsHMwonUNJALbLLK98SWDEZCxHd4B7Fnis6cQXg7PQOSeXh7uu2Jk X8TTWCWZ0VZSc6r/ubgWrd8YWn+DM1O9dAN3Akw25rsDqTu7bu0ewlmWpUXR4yhcREN3 cfwOQIpo8CkqRIJwbQOQu9V9QtJ0hRWKySmxvLpxpsrfMCZpvBvrQ2PB2uTRgaHeaKUD hlHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ueLyfLmMW2DD8ShyywQRRSZ54NHKZkZAcO2EBHAB0jU=; b=pgj7G3CWWtC9vQL2PtPutyVD/+xsWr79ObrGSgLRaZkhjnAgmeTjXTUmgV7GT4j/On OEcuwLQFJ6J8a0GKmheU5crgerdnNE4oyrshT/TorfyM78UHRVq11jCJlmIv92gM8rhj IelcU7d1mYjiR2PUgPtkQv/ErXcjawPGyYgIfnOsmoGlQ7NsWrPymxttGV6DiTezoCYF 0+gFce1qZcdlDFTnUltdLf1EIP0zb0TXzD1tCgvbY6OYbrGJWF004K0JVZZ4YteoWFkP UHuaufpIU4zIrtIZKhTgmd584SGBmkcPOA5F8SWTqAkwuRjwBKKOJoEIx+177L7YQqRH CApA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=ub+BhGDi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1-v6si510874pfc.337.2018.08.21.19.26.48; Tue, 21 Aug 2018 19:27:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=ub+BhGDi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727778AbeHVFsJ (ORCPT + 99 others); Wed, 22 Aug 2018 01:48:09 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:58900 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbeHVFsI (ORCPT ); Wed, 22 Aug 2018 01:48:08 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7M2K1xU055269; Wed, 22 Aug 2018 02:25:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=ueLyfLmMW2DD8ShyywQRRSZ54NHKZkZAcO2EBHAB0jU=; b=ub+BhGDiFshYzn/AgbozuzvHKf8rJyO62X/2OhfVugbJ/HkIKWp7atj4iJFJsPqySZk/ UnsG1YQ6RWBWrLIWUgapXGaK7cH9fMCNryABN1yl8N1Zd3vzc/buE0VNfxNljwgnVYkn g1jl+3YGlrzYZ4tuaZE2y2uYDMvEEHJce6abdihU9dLPeqUA5+dgHayfOCMkQVXcTNdl ZEIyhd9JLEcdNrEdEc48gc1TxgZ/kpL6imO/O5Hrl1WpqZ5dF7J8m5Qiwzf/bpnH4Bjm /kgbaQjo/KglQhl3t6gkOSZKRPF4N80hph+IzZuuGkd8suXhLWFebSYxVzHTqUecj/78 jg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2kxavtr0c9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Aug 2018 02:25:17 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w7M2PGXA025196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Aug 2018 02:25:16 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w7M2PFgv007715; Wed, 22 Aug 2018 02:25:15 GMT Received: from [192.168.1.164] (/50.38.38.67) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 21 Aug 2018 19:25:15 -0700 Subject: Re: [PATCH v2 0/2] mm: soft-offline: fix race against page allocation To: Naoya Horiguchi , Andrew Morton Cc: "linux-mm@kvack.org" , Michal Hocko , "xishi.qiuxishi@alibaba-inc.com" , "zy.zhengyi@alibaba-inc.com" , "linux-kernel@vger.kernel.org" References: <1531805552-19547-1-git-send-email-n-horiguchi@ah.jp.nec.com> <20180815154334.f3eecd1029a153421631413a@linux-foundation.org> <20180822013748.GA10343@hori1.linux.bs1.fc.nec.co.jp> From: Mike Kravetz Message-ID: Date: Tue, 21 Aug 2018 19:25:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180822013748.GA10343@hori1.linux.bs1.fc.nec.co.jp> Content-Type: text/plain; charset=iso-2022-jp Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8992 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808220022 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/21/2018 06:37 PM, Naoya Horiguchi wrote: > On Wed, Aug 15, 2018 at 03:43:34PM -0700, Andrew Morton wrote: >> On Tue, 17 Jul 2018 14:32:30 +0900 Naoya Horiguchi wrote: >> >>> I've updated the patchset based on feedbacks: >>> >>> - updated comments (from Andrew), >>> - moved calling set_hwpoison_free_buddy_page() from mm/migrate.c to mm/memory-failure.c, >>> which is necessary to check the return code of set_hwpoison_free_buddy_page(), >>> - lkp bot reported a build error when only 1/2 is applied. >>> >>> > mm/memory-failure.c: In function 'soft_offline_huge_page': >>> > >> mm/memory-failure.c:1610:8: error: implicit declaration of function >>> > 'set_hwpoison_free_buddy_page'; did you mean 'is_free_buddy_page'? >>> > [-Werror=implicit-function-declaration] >>> > if (set_hwpoison_free_buddy_page(page)) >>> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> > is_free_buddy_page >>> > cc1: some warnings being treated as errors >>> >>> set_hwpoison_free_buddy_page() is defined in 2/2, so we can't use it >>> in 1/2. Simply doing s/set_hwpoison_free_buddy_page/!TestSetPageHWPoison/ >>> will fix this. >>> >>> v1: https://lkml.org/lkml/2018/7/12/968 >>> >> >> Quite a bit of discussion on these two, but no actual acks or >> review-by's? > > Really sorry for late response. > Xishi provided feedback on previous version, but no final ack/reviewed-by. > This fix should work on the reported issue, but rewriting soft-offlining > without PageHWPoison flag would be the better fix (no actual patch yet.) > I'm not sure this patch should go to mainline immediately. FWIW - The 'migration of huge PMD shared pages' issue I am working was originally triggered via soft-offline. While working the issue, I tried to exercise huge page soft-offline really hard to recreate the issue and validate a fix. However, I was more likely to hit the soft-offline race(s) your patches address. Therefore, I applied your patches to focus my testing and validation on the migration of huge PMD shared pages issue. That is sort of a Tested-by :). Just wanted to point out that it was pretty easy to hit this issue. It was easier than the issue I am working. And, the issue I am trying to address was seen in a real customer environment. So, I would not be surprised to see this issue in real customer environments as well. If you (or others) think we should go forward with these patches, I can spend some time doing a review. Already did a 'quick look' some time back. -- Mike Kravetz