Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp994128pxb; Wed, 3 Mar 2021 23:53:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoIgv2j5DHbMrFiBQC8+Ka5yHYWsxtGp0O6RlGhvvN8d40WEAdg817RwZ0SN6ju6XONb95 X-Received: by 2002:a17:906:52d0:: with SMTP id w16mr2873112ejn.172.1614844405038; Wed, 03 Mar 2021 23:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614844405; cv=none; d=google.com; s=arc-20160816; b=tChWPI+z4d2l/Fy7aEiLIChuZPATSDW47oeqd94AM7YfKhGEefLu0oYGZEuXjJUncT WN4hbAJB6bjqwbpRKBVl2VZey18XkeeYqRGZnbVvfmHwKExTGB4q5yWGNp9ZfBZvEJPW 3oMvL7HXu6GVaHge5RR5aCpmr43KInGXQ2XS6zZozkY4YbAmGAF85LnwM+yckBBF/PrT S3t+kFXB3uXan+Z8siujFlkymEkVZaP4Uj8aRYXYBezx+JHX/gyddyjDAx2lL63pTD5g iZwZg3q5BSaYLo9f/pKlFiqxv5sh9nKAwykZ+2I6ReV+8t0qIRQQJaXJ0k55avbPsqKr d5Yw== 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=lVfA4qsQ/EcXcCKiEC4CuqfV0xUeTJfshoPATWapESA=; b=m1ornoNeOZxW6wTEM4Ue/lgVYf1vVouTXMFn0o/x3kfmgOiIFS01azbOLxYiJ7+CUW v8VZNCwSaAlhtXsYSmF2jwdPmSATeJQt4SCh1QqSHGSeLNZ2xwyfYqUbtFG3CI0MVFHL i6nyHGvuuV97Nn/oy5XuMJ/Rz4aaPxSdmi4icIsXluwMoeaZa/MMg2iJ5/xu3ZkWQxi7 LQT2Wpzg8Doeu4kTUiImL/vQEXLGIKpYA6bWlnKq3h09//PCCoqMUZcTynG205l+KFab sNA244CbAHBYZ7Yv2SBVSBpK9K+fdccL2A8EcctHAI6lcYxf6Se17NEAYDPM0Pkcn/SN 1CgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=InmdwqdR; 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 n15si10629299edy.363.2021.03.03.23.53.02; Wed, 03 Mar 2021 23:53:25 -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=InmdwqdR; 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 S1346605AbhCCK7E (ORCPT + 99 others); Wed, 3 Mar 2021 05:59:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29461 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1582425AbhCCKU7 (ORCPT ); Wed, 3 Mar 2021 05:20:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614766772; 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=lVfA4qsQ/EcXcCKiEC4CuqfV0xUeTJfshoPATWapESA=; b=InmdwqdRS6Q9PtVjzk3EPgSVha1/xzV699YuwbXfYn0QWP7EJgDSnnutrCIgJz37wdHC5m gapa8aUP7GW/iEs6qh0iL1NdzdnYT8Fiqi+5R+itpU9yrPZdhqamzJZUriS7Ftdy2ccVfg jbfJcFP1dj26Sh5hkMH8PyQL9JEl1Eo= 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-446-hoiVQ_PyMYyo5ByJpG6gZA-1; Wed, 03 Mar 2021 05:19:28 -0500 X-MC-Unique: hoiVQ_PyMYyo5ByJpG6gZA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1DA6835E20; Wed, 3 Mar 2021 10:19:26 +0000 (UTC) Received: from carbon (unknown [10.36.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACB3B60BFA; Wed, 3 Mar 2021 10:19:20 +0000 (UTC) Date: Wed, 3 Mar 2021 11:19:19 +0100 From: Jesper Dangaard Brouer To: Mel Gorman Cc: Ilias Apalodimas , Andrew Morton , Chuck Lever , LKML , Linux-Net , Linux-MM , Linux-NFS , brouer@redhat.com Subject: Re: [PATCH 4/5] net: page_pool: refactor dma_map into own function page_pool_dma_map Message-ID: <20210303111919.3c6e29cc@carbon> In-Reply-To: <20210303091825.GO3697@techsingularity.net> References: <20210301161200.18852-1-mgorman@techsingularity.net> <20210301161200.18852-5-mgorman@techsingularity.net> <20210303091825.GO3697@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.12 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, 3 Mar 2021 09:18:25 +0000 Mel Gorman wrote: > On Tue, Mar 02, 2021 at 08:49:06PM +0200, Ilias Apalodimas wrote: > > 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. Thanks for fixing this nitpick, and carrying the patch. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer