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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 B806EC433E0 for ; Mon, 22 Feb 2021 20:44:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6194F64E3F for ; Mon, 22 Feb 2021 20:44:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6194F64E3F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B6A556B0005; Mon, 22 Feb 2021 15:44:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B1AF06B006C; Mon, 22 Feb 2021 15:44:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A324E6B006E; Mon, 22 Feb 2021 15:44:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 8D7466B0005 for ; Mon, 22 Feb 2021 15:44:34 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 57AD7909D for ; Mon, 22 Feb 2021 20:44:34 +0000 (UTC) X-FDA: 77847082068.15.084B49B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf12.hostedemail.com (Postfix) with ESMTP id BA093132 for ; Mon, 22 Feb 2021 20:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614026673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=erluArlaVAOIhhxxcfXEzi/7V6axp72oHCGJmv+45x0=; b=c39+PrK+la8op8kicd/XtLeet33YkZoCSbYr9XKjGJEMWp4r1Br/UAPxMWSqxsTqXLJKTf Cn6fi6w2EED0CKcqQfGc7GNUQ8dRaTfvj/EF0peQfwYtTbMS1CNeAmgBc7t5E4vCkkzWaB 3LWpQ3KohI+ceY75cTtJwcbW7Z5COJU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-95-GImMfmVFPsaqzxcBzxSfGg-1; Mon, 22 Feb 2021 15:44:28 -0500 X-MC-Unique: GImMfmVFPsaqzxcBzxSfGg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6C6B5107ACE6; Mon, 22 Feb 2021 20:44:27 +0000 (UTC) Received: from carbon (unknown [10.36.110.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 756B85C1BD; Mon, 22 Feb 2021 20:44:22 +0000 (UTC) Date: Mon, 22 Feb 2021 21:44:20 +0100 From: Jesper Dangaard Brouer To: Mel Gorman Cc: Chuck Lever , Mel Gorman , Linux NFS Mailing List , "linux-mm@kvack.org" , brouer@redhat.com, "netdev@vger.kernel.org" Subject: Re: alloc_pages_bulk() Message-ID: <20210222214420.1341e50f@carbon> In-Reply-To: <20210215120608.GE3697@techsingularity.net> References: <2A0C36E7-8CB0-486F-A8DB-463CA28C5C5D@oracle.com> <20210209113108.1ca16cfa@carbon> <20210210084155.GA3697@techsingularity.net> <20210210124103.56ed1e95@carbon> <20210210130705.GC3629@suse.de> <20210211091235.GC3697@techsingularity.net> <20210215120608.GE3697@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Stat-Signature: i87u4phcjsupf6d3igeuw8ij95hyn1j7 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: BA093132 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614026668-531761 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, 15 Feb 2021 12:06:09 +0000 Mel Gorman wrote: > On Thu, Feb 11, 2021 at 04:20:31PM +0000, Chuck Lever wrote: > > > On Feb 11, 2021, at 4:12 AM, Mel Gorman wrote: > > > > > > > > > > > > Parameters to __rmqueue_pcplist are garbage as the parameter order changed. > > > I'm surprised it didn't blow up in a spectacular fashion. Again, this > > > hasn't been near any testing and passing a list with high orders to > > > free_pages_bulk() will corrupt lists too. Mostly it's a curiousity to see > > > if there is justification for reworking the allocator to fundamentally > > > deal in batches and then feed batches to pcp lists and the bulk allocator > > > while leaving the normal GFP API as single page "batches". While that > > > would be ideal, it's relatively high risk for regressions. There is still > > > some scope for adding a basic bulk allocator before considering a major > > > refactoring effort. > > > > > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > > index f8353ea7b977..8f3fe7de2cf7 100644 > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -5892,7 +5892,7 @@ __alloc_pages_bulk_nodemask(gfp_t gfp_mask, unsigned int order, > > > pcp_list = &pcp->lists[migratetype]; > > > > > > while (nr_pages) { > > > - page = __rmqueue_pcplist(zone, gfp_mask, migratetype, > > > + page = __rmqueue_pcplist(zone, migratetype, alloc_flags, > > > pcp, pcp_list); > > > if (!page) > > > break; > > > > The NFS server is considerably more stable now. Thank you! > > > > Thanks for testing! I've done some testing here: https://github.com/xdp-project/xdp-project/blob/master/areas/mem/page_pool06_alloc_pages_bulk.org Performance summary: - Before: 3,677,958 pps - After : 4,066,028 pps I'll describe/show the page_pool changes tomorrow. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer