Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5308524ybg; Tue, 22 Oct 2019 00:59:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl26zoYV0wNRz7Pj9mFW99DRcZ7d2QFP/2j1XJU0HrKvYvdoSTM4QdpRsbZYH9RmVuTtmb X-Received: by 2002:a17:906:6882:: with SMTP id n2mr26570431ejr.48.1571731152149; Tue, 22 Oct 2019 00:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571731152; cv=none; d=google.com; s=arc-20160816; b=mDfqeFzPQRqFQPKbzrqKpEDP2W87aWOLRbnUU7Px8l8e3EelR3L8zPFoSON1nyYKhQ YMUKuFMpFrRstvFfB69fSWGkwj090kv2pUNSGR0kRiGPeXQnNqdeyLuzXm62BoyixIig 2Om2mwztQdUOLoK8mG+I81Zu55zPa1aAnNxn0xlKtW6KPj7fx3AVG22PpR5G0q7QmU8W uFahsURlAdNrKW70qAQzkSlYuSChCjM8e+W2dUE8pPEpYuqlswatwYQIibHpifmE1NQS t0lC/NPpuq4a+cyqTcC/shJrDpSDboKOhejxVba0vvYa4ztgBdy0aFa6P/irhPrvfk/M 8Tbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JHU0NxbxCfuVdn/5Ns1cHCOBrsd6/ZDV3ch/qpy5V6Q=; b=EnEPM4NvXvpVZvhdZoUcayLtmXyTjT04LrNh2ZLo2odyJJ/7KqCHH+3AbkLYy1yE38 D8wKYBKhGuLt1F2BiHjRXQHq1FpBvCpeDD2fbw/0JnMFno6EFGCIZ7VvDWZovd3uelaB inY3GmI2jTMvxOGzigiZ2tQtYrmaJ5d4LoNIC65pYLM+tf2q9fJqp635cXgsTAcVbkmT 28GemdU8JD3UpIVIisbUwGg5XLx80svawiYkVT0Smy8m1WrVQynoOXnsu/aiLqzQfaTH vT8kq1Qa8Y2rxC+mc3icxxZiEbQUU3bn1JPacC8ZHtbpju24jUn7hsYtRTZ4AXf6SPzr m10w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si9714834ejn.362.2019.10.22.00.58.47; Tue, 22 Oct 2019 00:59:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387867AbfJVH4c (ORCPT + 99 others); Tue, 22 Oct 2019 03:56:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:47872 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726978AbfJVH4b (ORCPT ); Tue, 22 Oct 2019 03:56:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 23D46B27C; Tue, 22 Oct 2019 07:56:29 +0000 (UTC) Date: Tue, 22 Oct 2019 09:56:27 +0200 From: Oscar Salvador To: Michal Hocko Cc: n-horiguchi@ah.jp.nec.com, mike.kravetz@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 11/16] mm,hwpoison: Rework soft offline for in-use pages Message-ID: <20191022075626.GB19060@linux> References: <20191017142123.24245-1-osalvador@suse.de> <20191017142123.24245-12-osalvador@suse.de> <20191018123901.GN5017@dhcp22.suse.cz> <20191021134846.GB11330@linux> <20191021140619.GQ9379@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191021140619.GQ9379@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 21, 2019 at 04:06:19PM +0200, Michal Hocko wrote: > On Mon 21-10-19 15:48:48, Oscar Salvador wrote: > > We can only perform actions on LRU/Movable pages or hugetlb pages. > > What would prevent other pages mapped via page tables to be handled as > well? What kind of pages? I mean, I guess it could be done, it was just not implemented, and I did not want to add more "features" as my main goal was to re-work the interface to be more deterministic. > > 1) we would need to hook in enqueue_hugetlb_page so the page is not enqueued > > into hugetlb freelists > > 2) when trying to free a hugetlb page, we would need to do as we do for gigantic > > pages now, and that is breaking down the pages into order-0 pages and release > > them to the buddy (so the check in free_papges_prepare would skip the > > hwpoison page). > > Trying to handle a higher-order hwpoison page in free_pages_prepare is > > a bit complicated. > > I am not sure I see the problem. If you dissolve the hugetlb page then > there is no hugetlb page anymore and so you make it a regular high-order > page. Yes, but the problem comes when trying to work with a hwpoison high-order page in free_pages_prepare, it gets more complicated, and when I weigthed code vs benefits, I was not really sure to go down that road. If we get a hwpoison high-order page in free_pages_prepare, we need to break it down to smaller pages, so we can skip the "bad" to not be sent into buddy allocator. > If the page is free then it shouldn't pin the memcg or any other state. Well, it is not really free, as it is not usable, is it? Anyway, I do agree that we should clean the bondings to other subsystems like memcg. -- Oscar Salvador SUSE L3