Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2414913pxb; Fri, 8 Oct 2021 07:21:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8ZCwtfbwuJBwsPnB5s892mE49g2yEZJTWq5PNUb+WmBjtnfDi+b9BhCyFUNa3SrY9Bk96 X-Received: by 2002:a05:6402:438d:: with SMTP id o13mr13501373edc.0.1633702904618; Fri, 08 Oct 2021 07:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633702904; cv=none; d=google.com; s=arc-20160816; b=WVeXbGJHTymuaNIqU+GUqRq5NORfN2fEzVoKBJ0LysLcMAHRm4Gn8bAdIOXsYaWDSq ojohhcnfMyi40BjLB2MCld8v+uEiQCKr0m4VLVdjmkUgYXspcmHeez6ZsKJsDonfeoUw H/thRfbYVfIoDwxSmJu7lgG/pQYKwEOBTcjsBOEb8a6t5yJbZj5fy/glyxCu3gpogYFq MCcVio2NBr60pS6y0bCvxIHwMUMuSiXEDzY9FGqof+Qu38s9RJpprdPZemtbWpL0Ju31 wJzVcCQoLMBlI5s8Vmwb9xAwHMcGpg4KvcmLwfKZKDGbwth6xQxcHPvZznE8RdeYLIyK at6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YCLCraNpJQopiImw5TcsXBoafdL7BcjfipkPlCfzlkg=; b=Tfpn+jJEQNBvQPyFCAjcczdo4mhTPBEKtHxUO8OlLn7yLd8spemrIU/bsVUATOrlFH e5k+3n9jWHTF98Q4hwpfhCON/FEsFFeQlk9bVi3oH4Epu6szWSDcByktFzU6oVjdTj64 qXM+NWueCKDfvLUB6fdrv2eLZOeYqe4arhxNpvX7IY/evgGYRv4LQyAs2gxr4LloEAbf EpAyWszrGP4VNaw15ugwCpD5C7SWyYxy0L9z4G/B/fDP7PcL4WesjLnp0/UwbILpw7xn 9Z/mxCy40euvfQADzeNguGH/3g+OW9z1GUJ7/Wbd6Jo/LG/inRoIjkwT3eTkFZnGlGw/ +B2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eRE5gRsv; 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 b12si4805419ede.366.2021.10.08.07.21.21; Fri, 08 Oct 2021 07:21:44 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eRE5gRsv; 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 S234000AbhJHOTh (ORCPT + 99 others); Fri, 8 Oct 2021 10:19:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbhJHOTg (ORCPT ); Fri, 8 Oct 2021 10:19:36 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D9A5C061570 for ; Fri, 8 Oct 2021 07:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YCLCraNpJQopiImw5TcsXBoafdL7BcjfipkPlCfzlkg=; b=eRE5gRsvKuM1D1DasQG2Z7nq3S /u3YTf6hFL2Zju02FZ05H3bFRegRzqCjEP6Ed8daYVtcNqRud7SunJzVnxyL1EoJ6AfFVbCpqVDnf y4reX0allRGNPb2kH21tnsnRKU0jpMtOa/HkXAvK4hF3pw9WWWfERfGbBsSSd2IN4qJyqIcgq+pVt ll5hMrsD8xzmGDQ4AnAud5PtCPmcD81hiR7OyqF+NydWhHbmTk688WD2mFnZEk7AzyguFNYEGuN4P XuRAzTs8jvwu09qNqR6b+uvXERjNlDlduq9ZswjOI+l06v+0YeOGA79iZbZWpQrvX7HxYMIJsPgTZ 2cKWJfhQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYqgU-003ITa-Qn; Fri, 08 Oct 2021 14:17:17 +0000 Date: Fri, 8 Oct 2021 15:17:14 +0100 From: Matthew Wilcox To: Andrew Morton Cc: Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, anthony.yznaga@oracle.com Subject: Re: [PATCH v2] mm: Optimise put_pages_list() Message-ID: References: <20211007192138.561673-1-willy@infradead.org> <20211007123109.6a49c7c625e414acf7546c89@linux-foundation.org> <20211007163554.d9088a65f0e293e2bd906a56@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211007163554.d9088a65f0e293e2bd906a56@linux-foundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 07, 2021 at 04:35:54PM -0700, Andrew Morton wrote: > On Thu, 7 Oct 2021 21:55:21 +0100 Matthew Wilcox wrote: > > My first response is an appeal to authority -- release_pages() does > > this same thing. Only it takes an array, constructs a list and passes > > that to put_unref_page_list(). So if that's slower (and lists _are_ > > slower than arrays), we should have a put_unref_page_array(). > > And put_unref_page_list() does two passes across the list! > > > > Here is my beautiful release_pages(), as disrtibuted in linux-2.5.33: I think that looks much better! > I guess the current version is some commentary on the aging process? I blame the guy who sent cc59850ef940 to Linus back in 2011 ... I think Anthony was going to look into this and perhaps revert us to a pagevec_free() interface.