Received: by 10.223.185.116 with SMTP id b49csp4194591wrg; Tue, 13 Feb 2018 14:35:09 -0800 (PST) X-Google-Smtp-Source: AH8x224HqRGwKlJDCZ4sJ/dXlNd4TymeVL8bC8ZSzRtaTAIdT0xG1NqOviypyYGnScoIYta5+2ko X-Received: by 2002:a17:902:900b:: with SMTP id a11-v6mr2430323plp.249.1518561309291; Tue, 13 Feb 2018 14:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518561309; cv=none; d=google.com; s=arc-20160816; b=EPasaaY0fiQlFX+DZTB0gcAnmDWWkjelyEHN0H91O0PC3eW2DlclpGSumvh+RzvGkN 8hm1TBs9lBTqHH0W57s38nxbGG8HTyb5dzBDuF0ralmI7jb2I301hV6JpnSjPTs+Jmit jnS15n2WKl735hshri8C9HAnFFhgRW9bWU9AImTnZxuYYW3E8HnJ2abkYOsm7uDvDsni Mk/BRjSLJL9/YencgWVe/E/JdkvehoUtNaIi2E3/0DuGH+hrVSP5Ju6Vun37tZ3VUmRw 8qnOBbwEGxGE1wa1vIOsRxsvaVXeaztJeKDV271WcjI/sIrMNmVJIMl08scOQrqaLze2 25JA== 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=/7QAfiiTyK3Nn77ppACjCfUC2/C0WMEq0fRgVhhgk7E=; b=fRQAcrinaxMaXgPgSAgYYtLWJyBkKLimF+trt8Q18fTR1+Sr6Zskl4I/ZSd04HgVSQ kknaOkVYjtcgkagX2YjfyrCQWWIoBL5D0cDT3hBwMhMd0izDMzm/iahVjM0LHh/mwLtd vQFksDt6tuytUf+LSR0dum0ti6vSeMiDmBCt1pTqLNSKlyZXv/ZY5twr4grB1V125z6n 6dIAWbW87kQsaQcdKJXiBLtZ5XLJ9hdQDugY2G7Ymf9vJY/uG2gXYRDCQyqI+hlLZuRo OEPfitn8WiEw5tSGwyVZmPmFQ8869dHWhfQbhseBPc2neFpkqBOOimLUuF4JkkP+Xd8K xV/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=a1vQxVAO; 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 e3-v6si7982620plb.354.2018.02.13.14.34.53; Tue, 13 Feb 2018 14:35:09 -0800 (PST) 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-2017-10-26 header.b=a1vQxVAO; 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 S966007AbeBMWeM (ORCPT + 99 others); Tue, 13 Feb 2018 17:34:12 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:36970 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965942AbeBMWeL (ORCPT ); Tue, 13 Feb 2018 17:34:11 -0500 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 w1DMVSr7081074; Tue, 13 Feb 2018 22:33:41 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-2017-10-26; bh=/7QAfiiTyK3Nn77ppACjCfUC2/C0WMEq0fRgVhhgk7E=; b=a1vQxVAOPKmZ53qAlwix/EaDc1lmwq/1SfJCkyrVpGJJtvGyp0qbXEtU2m1nHshWfLWZ ixlMHx6OA5p15o/YxxrSiGxqg7kx00ABHX5QDHTlavbMXe2rnVRLHCT3ugQAUCn1GtWl T+382MSyLBAnsKfNSUWvNCU7qLl3FedDEN1K+pPj3JexmF7oPwhhRIDsO4Qoea2IO+Nc 1R7i6Lfm4dqPdVhDlV4WN0/++n1NvNwbH8I90KhUTy7XjiM8M93UuhjZEthuTk8P6I4/ TEFqCgAjgcYp6G2p0H7Xsch7plKVakWfZKGjriFiaDBLCQlhRVGPekx4TQnlRw7THzcu Fw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2g48ng82gf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Feb 2018 22:33:41 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w1DMXdY2029045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Feb 2018 22:33:39 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1DMXZtc001591; Tue, 13 Feb 2018 22:33:35 GMT Received: from [192.168.1.164] (/98.246.252.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 Feb 2018 14:33:34 -0800 Subject: Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage To: Michael Ellerman , Andrew Morton , Punit Agrawal Cc: Naoya Horiguchi , "linux-mm@kvack.org" , Michal Hocko , "Aneesh Kumar K.V" , Anshuman Khandual , "linux-kernel@vger.kernel.org" , Benjamin Herrenschmidt , "linuxppc-dev@lists.ozlabs.org" References: <20180130013919.GA19959@hori1.linux.bs1.fc.nec.co.jp> <1517284444-18149-1-git-send-email-n-horiguchi@ah.jp.nec.com> <87inbbjx2w.fsf@e105922-lin.cambridge.arm.com> <20180207011455.GA15214@hori1.linux.bs1.fc.nec.co.jp> <87fu6bfytm.fsf@e105922-lin.cambridge.arm.com> <20180208121749.0ac09af2b5a143106f339f55@linux-foundation.org> <87wozhvc49.fsf@concordia.ellerman.id.au> From: Mike Kravetz Message-ID: Date: Tue, 13 Feb 2018 14:33:33 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <87wozhvc49.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8804 signatures=668670 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 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-1711220000 definitions=main-1802130264 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/2018 06:48 PM, Michael Ellerman wrote: > Andrew Morton writes: > >> On Thu, 08 Feb 2018 12:30:45 +0000 Punit Agrawal wrote: >> >>>> >>>> So I don't think that the above test result means that errors are properly >>>> handled, and the proposed patch should help for arm64. >>> >>> Although, the deviation of pud_huge() avoids a kernel crash the code >>> would be easier to maintain and reason about if arm64 helpers are >>> consistent with expectations by core code. >>> >>> I'll look to update the arm64 helpers once this patch gets merged. But >>> it would be helpful if there was a clear expression of semantics for >>> pud_huge() for various cases. Is there any version that can be used as >>> reference? >> >> Is that an ack or tested-by? >> >> Mike keeps plaintively asking the powerpc developers to take a look, >> but they remain steadfastly in hiding. > > Cc'ing linuxppc-dev is always a good idea :) > Thanks Michael, I was mostly concerned about use cases for soft/hard offline of huge pages larger than PMD_SIZE on powerpc. I know that powerpc supports PGD_SIZE huge pages, and soft/hard offline support was specifically added for this. See, 94310cbcaa3c "mm/madvise: enable (soft|hard) offline of HugeTLB pages at PGD level" This patch will disable that functionality. So, at a minimum this is a 'heads up'. If there are actual use cases that depend on this, then more work/discussions will need to happen. From the e-mail thread on PGD_SIZE support, I can not tell if there is a real use case or this is just a 'nice to have'. -- Mike Kravetz >> Folks, this patch fixes a BUG and is marked for -stable. Can we please >> prioritize it? > > It's not crashing for me (on 4.16-rc1): > > # ./huge-poison > Poisoning page...once > Poisoning page...once again > madvise: Bad address > > And I guess the above is the expected behaviour? > > Looking at the function trace it looks like the 2nd madvise is going > down reasonable code paths, but I don't know for sure: > > 8) | SyS_madvise() { > 8) | capable() { > 8) | ns_capable_common() { > 8) 0.094 us | cap_capable(); > 8) 0.516 us | } > 8) 1.052 us | } > 8) | get_user_pages_fast() { > 8) 0.354 us | gup_pgd_range(); > 8) | get_user_pages_unlocked() { > 8) 0.050 us | down_read(); > 8) | __get_user_pages() { > 8) | find_extend_vma() { > 8) | find_vma() { > 8) 0.148 us | vmacache_find(); > 8) 0.622 us | } > 8) 1.064 us | } > 8) 0.028 us | arch_vma_access_permitted(); > 8) | follow_hugetlb_page() { > 8) | huge_pte_offset() { > 8) 0.128 us | __find_linux_pte(); > 8) 0.580 us | } > 8) 0.048 us | _raw_spin_lock(); > 8) | hugetlb_fault() { > 8) | huge_pte_offset() { > 8) 0.034 us | __find_linux_pte(); > 8) 0.434 us | } > 8) 0.028 us | is_hugetlb_entry_migration(); > 8) 0.032 us | is_hugetlb_entry_hwpoisoned(); > 8) 2.118 us | } > 8) 4.940 us | } > 8) 7.468 us | } > 8) 0.056 us | up_read(); > 8) 8.722 us | } > 8) + 10.264 us | } > 8) + 12.212 us | } > > > cheers > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org >