From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53829C433EF for ; Fri, 5 Nov 2021 10:58:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EA1C861220 for ; Fri, 5 Nov 2021 10:58:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EA1C861220 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6F2F66B006C; Fri, 5 Nov 2021 06:58:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A1396B0071; Fri, 5 Nov 2021 06:58:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 568B0940007; Fri, 5 Nov 2021 06:58:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 444B26B006C for ; Fri, 5 Nov 2021 06:58:21 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id ED61118045E80 for ; Fri, 5 Nov 2021 10:58:20 +0000 (UTC) X-FDA: 78774577560.25.691B570 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf14.hostedemail.com (Postfix) with ESMTP id 335F260019B1 for ; Fri, 5 Nov 2021 10:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636109899; h=from:from:reply-to:subject:subject: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=sSErx+kJ2ynt/KJbrh+QZMhOJvLTwiY8iyfjdsdplQM=; b=MClsTdrczSort83DRfSrQ+HyGW5SEKYy0kHkFPKidh8RkmqB2CLWq8YpgkuF7yJXNAYz4K bT0F9IfRrDD+LNNiL3LU2MYFVCgDuuN768VwTRHrmIaDtWzI6VeDYYbnH7ZFvNK2Sfv1sc M89G43Xs3RxkSjjDIfzwBIzKIXule0w= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-582-hABfEz5qPBGit1NA_1cPMA-1; Fri, 05 Nov 2021 06:58:18 -0400 X-MC-Unique: hABfEz5qPBGit1NA_1cPMA-1 Received: by mail-wr1-f71.google.com with SMTP id y10-20020adffa4a000000b0017eea6cb05dso2194208wrr.6 for ; Fri, 05 Nov 2021 03:58:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:organization:subject :in-reply-to:content-transfer-encoding; bh=sSErx+kJ2ynt/KJbrh+QZMhOJvLTwiY8iyfjdsdplQM=; b=f5f2AucwRfDTwqLvTFShzJ5dQSYL6QUeC6f3iV9DisrRuL3i9IQiKy6eHiBB2yzwns w3Rp2jKc0DNjo8krsSb2xJpwhvBX5olsxWkJ80u2osLRP5eBRKs5t67CtENLvj9gAQe6 xhbjwaA17x2kpwdTI8YCyCWY3rP2ia2i38peX0lVCeBECdZFRhRKTNHB/nDPw9m+VW7s Yi1dGmT7O1zhusJeMwgadJfcQPvjRwpVDlTsopumh+tKiYTH4Ki0v1CRxQrG+TeB8sMh 5nC9Iq9ZdAl+B89VGlPhT0emKtRHYhVpGjANZd9HF0LiZUj+n1k6hLXHA/GDxyhRHW9/ xdWQ== X-Gm-Message-State: AOAM5314KHk5MLrPd8VTa1f02ofWQKSUGrauClK6sd16RnEh2h5SiEax TA7vhIJGVcJt04Ma8BX4g0fONuidWWLFNgF9V0xITTaVxqt6NyZrzknnX/4Tuo4m5gwqPC5QIIb 5ptX8K0vrJc4= X-Received: by 2002:a1c:ed03:: with SMTP id l3mr30018038wmh.86.1636109897496; Fri, 05 Nov 2021 03:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW5ERgXtozFgG2CLpRjpzxMBE06phj3qPLFv2NX1yvKy0Ri/ouVaEC6qCHNGd7M2V/2Y7ARA== X-Received: by 2002:a1c:ed03:: with SMTP id l3mr30018008wmh.86.1636109897255; Fri, 05 Nov 2021 03:58:17 -0700 (PDT) Received: from ?IPV6:2003:d8:2f0c:a000:3f25:9662:b5cf:73f9? (p200300d82f0ca0003f259662b5cf73f9.dip0.t-ipconnect.de. [2003:d8:2f0c:a000:3f25:9662:b5cf:73f9]) by smtp.gmail.com with ESMTPSA id g5sm3684554wri.45.2021.11.05.03.58.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Nov 2021 03:58:16 -0700 (PDT) Message-ID: Date: Fri, 5 Nov 2021 11:58:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 To: Naoya Horiguchi , linux-mm@kvack.org Cc: Andrew Morton , Oscar Salvador , Michal Hocko , Ding Hui , Tony Luck , "Aneesh Kumar K.V" , Miaohe Lin , Yang Shi , Peter Xu , Naoya Horiguchi , linux-kernel@vger.kernel.org References: <20211105055058.3152564-1-naoya.horiguchi@linux.dev> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH v3 0/3] mm/hwpoison: fix unpoison_memory() In-Reply-To: <20211105055058.3152564-1-naoya.horiguchi@linux.dev> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 335F260019B1 X-Stat-Signature: qmhoaneyuwku576uetdfpbcbeyo74r9a Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=MClsTdrc; spf=none (imf14.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1636109901-342899 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 05.11.21 06:50, Naoya Horiguchi wrote: > Hi, > > I updated the unpoison patchset based ou discussions over v2. > Please see individual patches for details of updates. > > ----- (cover letter copied from v2) ----- > Main purpose of this series is to sync unpoison code to recent changes > around how hwpoison code takes page refcount. Unpoison should work or > simply fail (without crash) if impossible. > > The recent works of keeping hwpoison pages in shmem pagecache introduce > a new state of hwpoisoned pages, but unpoison for such pages is not > supported yet with this series. > > It seems that soft-offline and unpoison can be used as general purpose > page offline/online mechanism (not in the context of memory error). I'm not sure what the target use case would be TBH ... for proper memory offlining/memory hotunplug we have to offline whole memory blocks. For memory ballooning based mechanisms we simply allocate random free pages and eventually trigger reclaim to make more random free pages available. For memory hotunplug via virtio-mem we're using alloc_contig_range() to allocate ranges of interest we logically unplug. The only benefit compared to alloc_contig_range() might be that we can offline smaller chunks -- alloc_contig_range() isn't optimized for sub-MAX_ORDER granularity yet. But then, alloc_contig_range() should much rather be extended. Long story short, I'm not sure there is a sane use case for this "general purpose page offline/online mechanism" ... -- Thanks, David / dhildenb