Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4806510ybi; Tue, 28 May 2019 02:51:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/fVqIWHYBbU6JGh6nL7BbdwaDZ6BCMlo7O12XTAy+lFfxZmvA5+hs/5wf+9bg1I1eVqig X-Received: by 2002:a63:4d56:: with SMTP id n22mr104447699pgl.307.1559037114373; Tue, 28 May 2019 02:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559037114; cv=none; d=google.com; s=arc-20160816; b=Tw/3B8oOSvxOeVobfRlwKQbZcGM2Okl9+4lUy9WsDS5rGB1btUxa/S99+WIegEWorV mttYDM1jHtN4YrjgWxzRqa5kJ771Lw6XuIzqcPyBSeBqzjdAspRXfPiMUOo7XEpfuUSv gXckKZwbehbmWtWy873CF+74WALmxijfBimMnVq1ZMi7asXxxZ+Ts4XyLeyvHsW2+v9e +nOxEyMnu9xMVVy0GcA5SRUAI/47E1liKXYS3KgDPm/MJJ+1+HtwV3LFp5ZZry22AQMa Vi3QJ1PlLOgyS7Kr6sNxrzXXFIp6I8q/TzBvaNDPLb2UId46njeCzkTde/DO07pHConi Sipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KRi+/C+vm5cztpsXfUVeLkDOVPLB4aZqwygYNrBno1g=; b=jIasTMj4amC9lsT/87+9hfj30pT+hoAjh7TQ9gItulVRizxGAQrx3JiZ2a9yMA1EiU 3mBwiyqyLC2TnPsIoDQxVKdgqsybSGgOlT5UDU73nhLAA5d1eAfFC0Rgr/YqYnj5725R u37IFax2jKK3neFcoD++aa1drncaHO53mQWWgMi7GniclJjBLwr/FHbqSQUu6XOw4LuR HEd13rSG3sjoVWvr8fomttRX2QhgcwY8dzbQ6RQTyW1BiT588SNiIjn8irYIkdrY0MUb 2oXr4fKd2BC0cQBL6pA4BMYXK7fj1LPhsHDCMRwZC5CjU7n0s+oHatKKnJndO5e9NGHE X3kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q7xG41YY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si23432538pfn.80.2019.05.28.02.51.38; Tue, 28 May 2019 02:51:54 -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=@gmail.com header.s=20161025 header.b=Q7xG41YY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbfE1Jtg (ORCPT + 99 others); Tue, 28 May 2019 05:49:36 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:33268 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbfE1Jtg (ORCPT ); Tue, 28 May 2019 05:49:36 -0400 Received: by mail-ot1-f65.google.com with SMTP id 66so17188067otq.0; Tue, 28 May 2019 02:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KRi+/C+vm5cztpsXfUVeLkDOVPLB4aZqwygYNrBno1g=; b=Q7xG41YYF2ZmuxUb2X+ltjAzjeK7pLMfwEBHv5e2w+/MmZh8X55fZsTHT9XwciLR/E HuUQGjJdVYrVQVkKmY8LlYkvwBKwRNYDjTDClmfRqzoL4jelnRiuxN9nY1CE8DeXQjbm uW/8GSxTyhDXHpg7QNQnWu+TRA69AeqJj3mOkdLzAnVLLY34nt8Mg9u+dSa/lGR0mmQ4 JccPa4WCrMn9BC8uWe+Ufn2UXLgq+ojI+X2vf7wEFZnM/T4hy5jvbyFK5zDSmHkFTTfN pCgwp28ud4+Ut+QR/L2fuLRGXw+t5nbiVMf95C2wK8bIYx/jRFcU5iAPGuqOXpmI0DZs PNfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KRi+/C+vm5cztpsXfUVeLkDOVPLB4aZqwygYNrBno1g=; b=oPimW8BBAV6IalFCxN+/0bcPyNQIqmoZC/QyPGdOR2BnS3NwaN/lcR36IYIrd1dHQ3 D9ypzcfTY/jDF+SVLLYk/DD973fpmIxcan+K5TH7tNjm9tu3dG2Cd5pWxq0sz371Pdrc 70KjcAHrdeBStcz46Gql2Fph7NyNB128978JD4+7TlNoiE0MIj08smL4wdFU6vm7A442 bVHobaWKa9Dq/GS6UVen/W2FovJ6VCNlY40EtsjXEzPo1deXLpL4FVQTyZPmuR6DBj0n Mrv4q/Ha4JV/1i2aGmtQHPTgDk83iv8OE4K5mpXLPe9u0z4v5Frrf7BoQrtAhy2GyRpP QBFQ== X-Gm-Message-State: APjAAAUqP4bWJGRq0a/4OOC3XYivjlNwBmVn4+gbiXIcTbifwnslVt7P esrNNybYA/MUltEBH8ExnSpKyazeEpB9CSQLg0g= X-Received: by 2002:a9d:5a11:: with SMTP id v17mr17618810oth.254.1559036975223; Tue, 28 May 2019 02:49:35 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Wanpeng Li Date: Tue, 28 May 2019 17:49:28 +0800 Message-ID: Subject: Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage To: Mike Kravetz Cc: Michael Ellerman , Andrew Morton , Punit Agrawal , 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" , kvm , Paolo Bonzini , Xiao Guangrong , lidongchen@tencent.com, yongkaiwu@tencent.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc Paolo, Hi all, On Wed, 14 Feb 2018 at 06:34, Mike Kravetz wrote: > > 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'. 1GB hugetlbfs pages are used by DPDK and VMs in cloud deployment, we encounter gup_pud_range() panic several times in product environment. Is there any plan to reenable and fix arch codes? In addition, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kvm/mmu.c#n3213 The memory in guest can be 1GB/2MB/4K, though the host-backed memory are 1GB hugetlbfs pages, after above PUD panic is fixed, try_to_unmap() which is called in MCA recovery path will mark the PUD hwpoison entry. The guest will vmexit and retry endlessly when accessing any memory in the guest which is backed by this 1GB poisoned hugetlbfs page. We have a plan to split this 1GB hugetblfs page by 2MB hugetlbfs pages/4KB pages, maybe file remap to a virtual address range which is 2MB/4KB page granularity, also split the KVM MMU 1GB SPTE into 2MB/4KB and mark the offensive SPTE w/ a hwpoison flag, a sigbus will be delivered to VM at page fault next time for the offensive SPTE. Is this proposal acceptable? Regards, Wanpeng Li