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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C28CCA9EA0 for ; Tue, 22 Oct 2019 07:56:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 067CA20B7C for ; Tue, 22 Oct 2019 07:56:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 067CA20B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 950986B0006; Tue, 22 Oct 2019 03:56:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9017F6B0008; Tue, 22 Oct 2019 03:56:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 816DC6B000A; Tue, 22 Oct 2019 03:56:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id 5EE0D6B0006 for ; Tue, 22 Oct 2019 03:56:32 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id DF9405DFD for ; Tue, 22 Oct 2019 07:56:31 +0000 (UTC) X-FDA: 76070663382.24.swing16_90482cc11060e X-HE-Tag: swing16_90482cc11060e X-Filterd-Recvd-Size: 2909 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Oct 2019 07:56:31 +0000 (UTC) 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) 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 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