Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3473155pxb; Mon, 4 Oct 2021 03:08:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBSV5wN1EYdgD+AzmsEEmnHAKg7rHMNYFWen/6fT8Mi6sUzUWSzYWwiu8cSwkTQ0jftj4G X-Received: by 2002:a17:90b:1d89:: with SMTP id pf9mr3470624pjb.198.1633342113791; Mon, 04 Oct 2021 03:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633342113; cv=none; d=google.com; s=arc-20160816; b=0WBUe4txGEM4uB1O+s7czIbwhJN2Swq+MahrAteFBZ9LwAyqqpWdwyPn+TuiQC7lwO 9zd68hBM0aHWRBgMNuiUbnnimK5XaNo3cYlPsVL9ehIjTDLN5jjqsUmVsiuYsyd5Hr8c YrB980jbcYr71aIpcYm3iHcFrwVr2GD0TeNVLhWTEwOzDdPQ/XmkDVoIrrDQsmRdETLr xmdBVKgb28YsNhzt1EsddX6jVZlYifv/CToIKKDaCXKPPXJdG/sSX9iFMI2vnrxlBek2 oK3RJQ+/v9Dljq9v0u+X36oAMT0AEnamFDBHiqN7R1iqOIBHZg0i7UImee3u2HTvLFfN UVvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=pu5xNlyVyEDHD6M569DG7j4BaDjXTpdPNtB9z6vfePA=; b=0wpgjr5/h626pmHtodpTrjiRRMTrgGYolvj21qAIz67VobwOjV0TCvYqp7DzVvn20S sUL+Pn90Kyv/kVtagsj63cgMHm/w943IunNY0/UbMW/cQcH6I4394MWl0ZoxfFFkSs2K r0w6VovSsFKctxzoMmI6wewWuqBy1Mj2fE8r6GBuwXzlgX8IjjD6239XlCTtmb2tTZnF FYkIdOIjMnI7BDl6hYKkgSUN+9rbytkNwxe+iNBJWFnLTPWvH3PvsH0R7S8ic0AORtq7 e5yYs3M+cTRhmEpuUxnPdwE3awQG3RrJWYmNnzdmhfPSlMEuzw5yvcGNlgbh6s3G3vQ+ ZK5w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si14117967pff.308.2021.10.04.03.08.18; Mon, 04 Oct 2021 03:08:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231575AbhJDJM2 (ORCPT + 99 others); Mon, 4 Oct 2021 05:12:28 -0400 Received: from outbound-smtp29.blacknight.com ([81.17.249.32]:47119 "EHLO outbound-smtp29.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbhJDJM2 (ORCPT ); Mon, 4 Oct 2021 05:12:28 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp29.blacknight.com (Postfix) with ESMTPS id 8E0BABEB37 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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