Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1880265pxb; Mon, 22 Feb 2021 13:31:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsZkqRAGvkaiXGBIL1CYpMdPbwr6s0mBZSLx/E+k2W489Nmoo58t5nN4O7Vu14xlTCVe65 X-Received: by 2002:a05:6402:84a:: with SMTP id b10mr9871901edz.372.1614029460686; Mon, 22 Feb 2021 13:31:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614029460; cv=none; d=google.com; s=arc-20160816; b=rWkFwHs3OwZHVSabHfXknOlVSixqWiRgNlhhRLvG51t0G1Gs6jYUD1sSRGTollB7Jg vJs/TWG4c/e8FX9iC17nVnIvL1FgpkqLHx/OlUUpjAfodylt+QV0jpoldVZ87d1W//iD P8og+DwZbFrEKJnHuw4sFiZ7JlMi6v3WyyMoL37ufG4jEeZN80YeOLRGzOKg54qf9QSL 4BYnr/TQ60BA/VbD89Tx5X2khBMQws3kBoI7DoPQq96CIzVpr6XXzahN2TXI2T4tP65+ epz1s6Ec7SMuyH/4VelNP4lOYorlhTBWLrVzw1luFn9NlwgAk7+4CVqw2AixUYaLTBpH hIkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=erluArlaVAOIhhxxcfXEzi/7V6axp72oHCGJmv+45x0=; b=uJVSjkMsQTbkFvZ5eTCJE7tVnVfX0F1Y1jA1/sZQ0+YDyBEa71pabDSJ+E0/tccjmD N9dhM56y1rPNNstowooQ+eJpHLY5qEXEZVxFO4XuuYIwuSHGApHltMJqBe82SsxKDHW7 yHpBGGBHQoFEk+WTJzOv9rLbFDP/9qGgWoVNFsw/yL4y1DuZlfAd9nFi/XzdWIv7NAbX ubws2RsRwKe0ilJ58AweU6Wgnc3zFKy166cKlAMLpXMF01GU67NDhgt+uePxg/B1a0CK iQjH7+O5/S+KqCV/KlLcEtMA62lmDO+5v7ECDEqbdWeN+KTPI2/Rb1tfrV35yZcsKKFk BbKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="X/+j5Nr1"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si12675985ejt.469.2021.02.22.13.30.24; Mon, 22 Feb 2021 13:31:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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=@redhat.com header.s=mimecast20190719 header.b="X/+j5Nr1"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230423AbhBVUp6 (ORCPT + 99 others); Mon, 22 Feb 2021 15:45:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49155 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230261AbhBVUp5 (ORCPT ); Mon, 22 Feb 2021 15:45:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614026671; 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=X/+j5Nr1P8zSnHj4na53MJq5TeYdtZpEoRT/PLZ60/w4Kd16l4NCy+tSiXMT3nod1d4cCf PfE34ls7WUcaiNYftWxtc6uvT9pYJ1OdWBoF/k90G4RBy+qXKyz8YZHilujqLR3SDiYmPf X/e0l7G9iUKWAhklWQ+tXAK0+0+jvBA= 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 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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