Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3119921pxf; Mon, 15 Mar 2021 01:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzggNJNp1mpry2f+Xi/U7KwcpuNpaC9sahyWOgETZKSTwVkfcovZhMxvTh2woL0UC0atnIY X-Received: by 2002:aa7:c150:: with SMTP id r16mr28012524edp.96.1615797804881; Mon, 15 Mar 2021 01:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615797804; cv=none; d=google.com; s=arc-20160816; b=f08oaugkQFdx1jyKtjMTrPGeELA4NvANHyN8GlbXluhkUsSjfb8p7AToLnj2tU3NMD jio5wJk1BjE4Y5YV4PbkeVWR/TPtV5RMEG1ptGp7lhQY7D4nexC7p2xCiEmivKMZMjur pZtfc+jVR8R4SpaSIzYrjKmvXYlpO38fXkF7UIGI/On+vq8IErhxevzSFYEVgk32Kubm +F5cYCaiLLdj4X0LX6A0/jAuxdlTV/HOlaHbMbzM/gsCBPv5b48S45e5NaUSjxDapUoQ OlPMFz9k3N4pqnic5zzNAcy/9IEL5QkxSOCjPXdkY/lYHKLyADvsFSDF06YJGDhvmIFk tBdA== 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=YPPOlhAj1o8Bjr5m9KBGd7ssNyhGXUk+iULC8T743WI=; b=dQaPiQut3m4EcTq2hwfWqKi59jLxzzajzInI6x4tlVQO/mkVoUD+XicQBVn58aUxwD +Pz1Qup1k17CdgT/pFagpUvGeWK5kNYXu6b8DrH5BtHAXewvVVy4U6htZvnophokUqQj fI8925inTayquh8C8tlrK+/FlWvBV8lVioNRwgyGk+1lbNagRLkTby2+I9zlO5iRWo2T ZwpRFpX/LFavweVwqjW+bMrNby2trAHC2Z//qnnY3UHmfmHDGpNUcme2yio8udrrCAwC x5lJtwE3nH1h6SkIqMV/9VzdXjrlS4Uh6UFSdlozm3D+Xf3TlthgdLqCXe7DBiOzGn7q yCug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XDL+dbam; 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 z2si1002129eju.371.2021.03.15.01.42.53; Mon, 15 Mar 2021 01:43:24 -0700 (PDT) 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=XDL+dbam; 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 S229540AbhCOIlE (ORCPT + 99 others); Mon, 15 Mar 2021 04:41:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43160 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbhCOIkw (ORCPT ); Mon, 15 Mar 2021 04:40:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615797652; 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=YPPOlhAj1o8Bjr5m9KBGd7ssNyhGXUk+iULC8T743WI=; b=XDL+dbamYSqgfRoqriCz8kEdX4OUgQ/Qb6uYNZtltiLVLeO/NxfAUaOqazvIxp8MMAPTAG FLAwu6ILKVRCyhw9oJVm01rra/rVy2zBJqiAqZ8W8D2G0uBgmYGjnrhqxfs4MIEemT51OA 5RmmF8MlDX1hnOt/FyRJrf7XpabUiaY= 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-170-stEjHMdbP6auVPr4NLcJ5Q-1; Mon, 15 Mar 2021 04:40:48 -0400 X-MC-Unique: stEjHMdbP6auVPr4NLcJ5Q-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 12C55192D787; Mon, 15 Mar 2021 08:40:46 +0000 (UTC) Received: from carbon (unknown [10.36.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64DC85C5E0; Mon, 15 Mar 2021 08:40:39 +0000 (UTC) Date: Mon, 15 Mar 2021 09:40:38 +0100 From: Jesper Dangaard Brouer To: Mel Gorman Cc: Alexander Duyck , Andrew Morton , Chuck Lever , Christoph Hellwig , Matthew Wilcox , LKML , Linux-Net , Linux-MM , Linux-NFS , brouer@redhat.com Subject: Re: [PATCH 7/7] net: page_pool: use alloc_pages_bulk in refill code path Message-ID: <20210315094038.22d6d79a@carbon> In-Reply-To: <20210313133058.GZ3697@techsingularity.net> References: <20210312154331.32229-1-mgorman@techsingularity.net> <20210312154331.32229-8-mgorman@techsingularity.net> <20210313133058.GZ3697@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 Sat, 13 Mar 2021 13:30:58 +0000 Mel Gorman wrote: > On Fri, Mar 12, 2021 at 11:44:09AM -0800, Alexander Duyck wrote: > > > - /* FUTURE development: > > > - * > > > - * Current slow-path essentially falls back to single page > > > - * allocations, which doesn't improve performance. This code > > > - * need bulk allocation support from the page allocator code. > > > - */ > > > - > > > - /* Cache was empty, do real allocation */ > > > -#ifdef CONFIG_NUMA > > > - page = alloc_pages_node(pool->p.nid, gfp, pool->p.order); > > > -#else > > > - page = alloc_pages(gfp, pool->p.order); > > > -#endif > > > - if (!page) > > > + if (unlikely(!__alloc_pages_bulk(gfp, pp_nid, NULL, bulk, &page_list))) > > > return NULL; > > > > > > + /* First page is extracted and returned to caller */ > > > + first_page = list_first_entry(&page_list, struct page, lru); > > > + list_del(&first_page->lru); > > > + > > > > This seems kind of broken to me. If you pull the first page and then > > cannot map it you end up returning NULL even if you placed a number of > > pages in the cache. > > > > I think you're right but I'm punting this to Jesper to fix. He's more > familiar with this particular code and can verify the performance is > still ok for high speed networks. Yes, I'll take a look at this, and updated the patch accordingly (and re-run the performance tests). -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer