Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2844794pxb; Fri, 5 Nov 2021 05:45:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoAZoZZp5kN0s4Ci2ykmi1+MROiT9Bl6YsZBS3tLiLISB36Dfx64V2gXoVOMasVFPaosSe X-Received: by 2002:a17:906:c187:: with SMTP id g7mr69344833ejz.534.1636116346491; Fri, 05 Nov 2021 05:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636116346; cv=none; d=google.com; s=arc-20160816; b=E/ij4C64L05MVxGJC/ccekC43TAoNTUYyIp89wv7WcpwN8S37r05s879tSlloqKz0y gyP/OShHKAasDX08hoAipnPmz994pudfInrGrvPlf671qA9LifPzgm8EKfQKPeqrF6MN yCWk/egAiE3QOPHHc/cGuZvmEZaaQBBYpmm/l20IQbw8q+7GWsiS0AOXSRulkw8wyD9H XYZko5E4hYyv5DyYJB9jmbLsbG8g2Ej3WQbySEpMX6uDar5a3OIJqK/ts73IncizZ1NH +izGew1vKP+dwZN0Vy85Qqs43E7tSdSk3ROaeUctEg0iIxOhUvLbv3R9eEvfjnBSZ4T/ VQsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:dkim-signature:date; bh=PstElwx1eHISZknSHtmk0mKL3v3w5arvXKrkYvDW1AA=; b=G1z+F+EuFRO0toQpiiLi5brabitpqN/lAJVnLK5J+N9HBi73cbrQDnCq2sTirykTrF 6dkBy1M3BQ67lnmaswpuxAa5z/e2bubM+y/w5iwpq7GyOybVbHEdmWEZw8A9iPe7u567 3ySwWsYnVq4dn07wIyGZIwHFNmd9pplgy5BhfO9BTYUG01m3OP1OjINU+xfoS/i4isAI Y2dgSGddCJtE4ORBu7XcH3nDJ/5Mbpqf6XLlf6cZT8c1W7+QQnOTfhtiLfRBk9GhrFxH hWsfS3pAEuggJs1DBkCUntwnanopdwd2jq5kfW4XnN04ZC2hcgDNHWrr6zdQOPDeA1la j0mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oa9juKgR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si5381495ejs.575.2021.11.05.05.45.20; Fri, 05 Nov 2021 05:45:46 -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=@linux.dev header.s=key1 header.b=oa9juKgR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232678AbhKELwq (ORCPT + 99 others); Fri, 5 Nov 2021 07:52:46 -0400 Received: from out1.migadu.com ([91.121.223.63]:55991 "EHLO out1.migadu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbhKELwp (ORCPT ); Fri, 5 Nov 2021 07:52:45 -0400 Date: Fri, 5 Nov 2021 20:49:54 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1636113004; 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: in-reply-to:in-reply-to; bh=PstElwx1eHISZknSHtmk0mKL3v3w5arvXKrkYvDW1AA=; b=oa9juKgR5gf24x1lNqNPzbpYlKMamJvPc5ehAtL+FdcVMCrIdMPG4JAyNMT+EbAL6o6A86 factHVWknALHVa2daYZdj3NK3ikQ7VbvnufWo34/YgOOtFAj08nTH1ivGJ9JCWlfxUf+50 RKoUN68yCgm3EnDGrAavu2UcdHVUqKI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Naoya Horiguchi To: David Hildenbrand Cc: Naoya Horiguchi , linux-mm@kvack.org, Andrew Morton , Oscar Salvador , Michal Hocko , Ding Hui , Tony Luck , "Aneesh Kumar K.V" , Miaohe Lin , Yang Shi , Peter Xu , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/3] mm/hwpoison: fix unpoison_memory() Message-ID: <20211105114954.GA3163106@u2004> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: naoya.horiguchi@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 05, 2021 at 11:58:15AM +0100, David Hildenbrand wrote: > 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. I heard about it from two people independently and I think that that's maybe a rough idea, so if no one shows the clear use case or someone logically shows that we don't need it, I do not head for it. > > 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. If alloc_contig_range() supports memory offline in arbitrary size of granurality (including a single page), maybe soft offline can be (partially I guess) unified to it. Thanks, Naoya Horiguchi > > Long story short, I'm not sure there is a sane use case for this > "general purpose page offline/online mechanism" ...