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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 F3EAAC433DB for ; Wed, 3 Mar 2021 16:30:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8D8464E74 for ; Wed, 3 Mar 2021 16:30:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346435AbhCCQ0V (ORCPT ); Wed, 3 Mar 2021 11:26:21 -0500 Received: from outbound-smtp21.blacknight.com ([81.17.249.41]:52995 "EHLO outbound-smtp21.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243405AbhCCLrK (ORCPT ); Wed, 3 Mar 2021 06:47:10 -0500 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp21.blacknight.com (Postfix) with ESMTPS id B972DCCB24 for ; Wed, 3 Mar 2021 09:18:28 +0000 (GMT) Received: (qmail 8195 invoked from network); 3 Mar 2021 09:18:28 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 3 Mar 2021 09:18:28 -0000 Date: Wed, 3 Mar 2021 09:18:25 +0000 From: Mel Gorman To: Ilias Apalodimas Cc: Andrew Morton , Chuck Lever , Jesper Dangaard Brouer , LKML , Linux-Net , Linux-MM , Linux-NFS Subject: Re: [PATCH 4/5] net: page_pool: refactor dma_map into own function page_pool_dma_map Message-ID: <20210303091825.GO3697@techsingularity.net> References: <20210301161200.18852-1-mgorman@techsingularity.net> <20210301161200.18852-5-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 08:49:06PM +0200, Ilias Apalodimas wrote: > Hi Mel, > > Can you please CC me in future revisions. I almost missed that! > Will do. > On Mon, Mar 01, 2021 at 04:11:59PM +0000, Mel Gorman wrote: > > From: Jesper Dangaard Brouer > > > > In preparation for next patch, move the dma mapping into its own > > function, as this will make it easier to follow the changes. > > > > V2: make page_pool_dma_map return boolean (Ilias) > > > > [...] > > > @@ -211,30 +234,14 @@ static struct page *__page_pool_alloc_pages_slow(struct page_pool *pool, > > if (!page) > > return NULL; > > > > - if (!(pool->p.flags & PP_FLAG_DMA_MAP)) > > - goto skip_dma_map; > > - > > - /* Setup DMA mapping: use 'struct page' area for storing DMA-addr > > - * since dma_addr_t can be either 32 or 64 bits and does not always fit > > - * into page private data (i.e 32bit cpu with 64bit DMA caps) > > - * This mapping is kept for lifetime of page, until leaving pool. > > - */ > > - dma = dma_map_page_attrs(pool->p.dev, page, 0, > > - (PAGE_SIZE << pool->p.order), > > - pool->p.dma_dir, DMA_ATTR_SKIP_CPU_SYNC); > > - if (dma_mapping_error(pool->p.dev, dma)) { > > + if (pp_flags & PP_FLAG_DMA_MAP && > > Nit pick but can we have if ((pp_flags & PP_FLAG_DMA_MAP) && ... > Done. > [...] > > > > > Otherwise > Reviewed-by: Ilias Apalodimas Thanks. I'll wait for other review feedback before sending a V2. -- Mel Gorman SUSE Labs