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 0837FC433EF for ; Mon, 4 Oct 2021 09:10:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8D27A61507 for ; Mon, 4 Oct 2021 09:10:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D27A61507 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 91A5B900002; Mon, 4 Oct 2021 05:10:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C9676B0075; Mon, 4 Oct 2021 05:10:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DF7A900002; Mon, 4 Oct 2021 05:10:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 6EA0E6B0074 for ; Mon, 4 Oct 2021 05:10:41 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 073B02D3A1 for ; Mon, 4 Oct 2021 09:10:41 +0000 (UTC) X-FDA: 78658184682.34.43AF790 Received: from outbound-smtp02.blacknight.com (outbound-smtp02.blacknight.com [81.17.249.8]) by imf23.hostedemail.com (Postfix) with ESMTP id 35DBD9001B1F for ; Mon, 4 Oct 2021 09:10:40 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp02.blacknight.com (Postfix) with ESMTPS id 8DB3FBAA00 for ; Mon, 4 Oct 2021 10:10:38 +0100 (IST) Received: (qmail 3870 invoked from network); 4 Oct 2021 09:10:38 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.29]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 4 Oct 2021 09:10:38 -0000 Date: Mon, 4 Oct 2021 10:10:37 +0100 From: Mel Gorman To: "Matthew Wilcox (Oracle)" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] mm: Optimise put_pages_list() Message-ID: <20211004091037.GM3959@techsingularity.net> References: <20210930163258.3114404-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210930163258.3114404-1-willy@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 35DBD9001B1F X-Stat-Signature: imi3j777qpiyshz9su11eig16jfutfut Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.8 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspamd-Server: rspam06 X-HE-Tag: 1633338640-277860 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 Thu, Sep 30, 2021 at 05:32:58PM +0100, Matthew Wilcox (Oracle) wrote: > Instead of calling put_page() one page at a time, pop pages off > the list if there are other refcounts and pass the remainder > to free_unref_page_list(). This should be a speed improvement, > but I have no measurements to support that. It's also not very > widely used today, so I can't say I've really tested it. I'm only > bothering with this patch because I'd like the IOMMU code to use it > https://lore.kernel.org/lkml/20210930162043.3111119-1-willy@infradead.org/ > > Signed-off-by: Matthew Wilcox (Oracle) I see your motivation but you need to check that all users of put_pages_list (current and future) handle destroy_compound_page properly or handle it within put_pages_list. For example, the release_pages() user of free_unref_page_list calls __put_compound_page directly before freeing. put_pages_list as it stands will call dstroy_compound_page but free_unref_page_list does not destroy compound pages in free_pages_prepare -- Mel Gorman SUSE Labs