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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 70FD2C34050 for ; Wed, 19 Feb 2020 14:33:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 32C5E2465D for ; Wed, 19 Feb 2020 14:33:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32C5E2465D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D37FB6B0003; Wed, 19 Feb 2020 09:33:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CE7206B0006; Wed, 19 Feb 2020 09:33:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD5456B0007; Wed, 19 Feb 2020 09:33:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id A32676B0003 for ; Wed, 19 Feb 2020 09:33:06 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 47008247A for ; Wed, 19 Feb 2020 14:33:06 +0000 (UTC) X-FDA: 76507118772.24.ship63_725611c014b5b X-HE-Tag: ship63_725611c014b5b X-Filterd-Recvd-Size: 2942 Received: from outbound-smtp55.blacknight.com (outbound-smtp55.blacknight.com [46.22.136.239]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 14:33:05 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp55.blacknight.com (Postfix) with ESMTPS id 1B6CFFAFB7 for ; Wed, 19 Feb 2020 14:33:04 +0000 (GMT) Received: (qmail 26706 invoked from network); 19 Feb 2020 14:33:03 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.18.57]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 19 Feb 2020 14:33:03 -0000 Date: Wed, 19 Feb 2020 14:33:00 +0000 From: Mel Gorman To: Alexander Duyck Cc: kvm@vger.kernel.org, david@redhat.com, mst@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, yang.zhang.wz@gmail.com, pagupta@redhat.com, konrad.wilk@oracle.com, nitesh@redhat.com, riel@surriel.com, willy@infradead.org, lcapitulino@redhat.com, dave.hansen@intel.com, wei.w.wang@intel.com, aarcange@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, mhocko@kernel.org, alexander.h.duyck@linux.intel.com, vbabka@suse.cz, osalvador@suse.de Subject: Re: [PATCH v17 3/9] mm: Add function __putback_isolated_page Message-ID: <20200219143300.GR3466@techsingularity.net> References: <20200211224416.29318.44077.stgit@localhost.localdomain> <20200211224624.29318.89287.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20200211224624.29318.89287.stgit@localhost.localdomain> 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 Tue, Feb 11, 2020 at 02:46:24PM -0800, Alexander Duyck wrote: > From: Alexander Duyck > > There are cases where we would benefit from avoiding having to go through > the allocation and free cycle to return an isolated page. > > Examples for this might include page poisoning in which we isolate a page > and then put it back in the free list without ever having actually > allocated it. > > This will enable us to also avoid notifiers for the future free page > reporting which will need to avoid retriggering page reporting when > returning pages that have been reported on. > > Acked-by: David Hildenbrand > Signed-off-by: Alexander Duyck Ok, the prior code that used post_alloc_hook to make the isolated page seem like a normally allocated page followed by a free seems strange anyway. As well as being expensive, isolated pages can end up on the per-cpu lists which is probably not what is desired. I *think* what you've done is ok so Acked-by: Mel Gorman -- Mel Gorman SUSE Labs