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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 85747C433E0 for ; Wed, 3 Mar 2021 09:18:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 54E7A64EED for ; Wed, 3 Mar 2021 09:18:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54E7A64EED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A4A0C8D013C; Wed, 3 Mar 2021 04:18:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D2E78D0135; Wed, 3 Mar 2021 04:18:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84CF18D013C; Wed, 3 Mar 2021 04:18:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 654668D0135 for ; Wed, 3 Mar 2021 04:18:31 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CC04E52A0 for ; Wed, 3 Mar 2021 09:18:30 +0000 (UTC) X-FDA: 77878012380.17.7B258EB Received: from outbound-smtp10.blacknight.com (outbound-smtp10.blacknight.com [46.22.139.15]) by imf14.hostedemail.com (Postfix) with ESMTP id CD482C0007C5 for ; Wed, 3 Mar 2021 09:18:28 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp10.blacknight.com (Postfix) with ESMTPS id C44611C42C8 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) X-Stat-Signature: postxr83s41bzrj4to73bbrchoiwq1s9 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: CD482C0007C5 Received-SPF: none (techsingularity.net>: No applicable sender policy available) receiver=imf14; identity=mailfrom; envelope-from=""; helo=outbound-smtp10.blacknight.com; client-ip=46.22.139.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1614763108-7901 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 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