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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 40900C06513 for ; Thu, 4 Jul 2019 11:11:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 193D02189E for ; Thu, 4 Jul 2019 11:11:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PTA1LMa0"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AcU/Og0I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 193D02189E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Iam8B1z91Qp3WXuZaophq8UYuUi5ey6iNL0X0RfTRUg=; b=PTA1LMa0JLNyeb WwG7McVSqqDZaY3tru/ttx0pPrjfGRMSb26kz3789BxadOlu0CCLOFdwmEbvj4hLrocrNxmevU3Ai mOFlRLqLYzjx+itlkfGMf5fLxh+aORCEHsf7kiK1eCUtmtqkM9fUt2D+bD38QZf/RL3gMr3t3QH1F 0YX7JKTkmmW9O8yhBHiubArn6pwUVTGGq7H6uOWmrJpQeUnyeUmmG4u0t1M873fFVBR/6nBfepbTz l2dnhDmBB3S9ivCpLpsC+YtpXT20n/f856fWBwskYIk2MQTsG5vkwGkNfhYiWcJryBj6IThtoSJWV /u+pSIkkIY7XL9ZqniNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hize1-0004a6-Iz; Thu, 04 Jul 2019 11:11:17 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hizdz-0004Zk-59 for linux-arm-kernel@lists.infradead.org; Thu, 04 Jul 2019 11:11:16 +0000 Received: by mail-wr1-x442.google.com with SMTP id n9so6217011wru.0 for ; Thu, 04 Jul 2019 04:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=l8xOwRoeewzebcQAt1yKxsHLrRV9J9YjppTfdC6bYO4=; b=AcU/Og0Im9zeCUoAjQfz6t1TPM7Mfh0ysWoMMrnoAxopui+jfwRP+8ITrmS17IrY1C KEs0UE42QQXFtM3Plib24n04BsaZx7YpdSdT+lXwkDmW5UXo5AVmjENp8T4Yk5L4W3qL ya3qtdkWWGhERgwew7vMxaZiQ0oib0yFn8XnrueuwqH8INdv94RXEj/zk8dU3Gtn4O0A 6EwHajqBOaWPjJJmtSLrm8PZE5Ma9nIUkyig0AkkUrnFH46TF6oLK4F+36SuPCPJzrid vsMqp3WqEkNc7NWqF0JoS9TZcj/Wt9C7JFdlMtv8VS6Ms36Kj4I2IsGthBfqv69AJ3yx KAhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=l8xOwRoeewzebcQAt1yKxsHLrRV9J9YjppTfdC6bYO4=; b=uGxuVify4Px53OTaNsrnMK1JzTXZQq+rnNAxxPwRuiEZmeMPo7pg4cdoogKaqQp46t hYgA8t6Hcs3N1phFWAwzUlpWN/Kxlg7UlRgOiQJiG8AyFjjlkfYg/eE4NAa3DIq57i+B joTAJiJ9tks14u1z3lphFGZdPDl0NWofFXsZBn9zr9zwIIVyh624oK0eGLz/e0m0BhoA rRo0eAnXCNPxE7uHGpexL1ySRF/S5SCTr8Uxd4Kh4CCxmbEyXEmaHnKYLJ7gRa5d5P6k BFJLo+S7GwYKs2Pn7cp2Yb9oproOb4tfOOzKoNbSkRuo3/mdeiAmlOLS7hO0Jfn852mQ Qt+A== X-Gm-Message-State: APjAAAUNwwwLLKobgNObojn8xMHPUASR1HR7/6K+f6ae06zmWaT+wh1W XZQVpLMIc7dhB7Xk2Ks4mXcZlA== X-Google-Smtp-Source: APXvYqwc3n6Z1DTK4DI0irtOTjnyQp+cY9JrkG89Fk1+0XQ7A/1JudehcvBrF5/bUdDdbNSumzT99A== X-Received: by 2002:adf:dfc4:: with SMTP id q4mr32763692wrn.54.1562238673665; Thu, 04 Jul 2019 04:11:13 -0700 (PDT) Received: from apalos (athedsl-428434.home.otenet.gr. [79.131.225.144]) by smtp.gmail.com with ESMTPSA id r4sm4942586wrv.34.2019.07.04.04.11.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 04:11:12 -0700 (PDT) Date: Thu, 4 Jul 2019 14:11:09 +0300 From: Ilias Apalodimas To: Jose Abreu Subject: Re: [PATCH net-next 3/3] net: stmmac: Introducing support for Page Pool Message-ID: <20190704111109.GA12011@apalos> References: <1b254bb7fc6044c5e6e2fdd9e00088d1d13a808b.1562149883.git.joabreu@synopsys.com> <20190704120018.4523a119@carbon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190704_041115_215277_234AC4C0 X-CRM114-Status: GOOD ( 18.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joao Pinto , Alexandre Torgue , Maxime Ripard , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "David S . Miller" , Chen-Yu Tsai , Maxime Coquelin , Jesper Dangaard Brouer , Giuseppe Cavallaro , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 04, 2019 at 10:13:37AM +0000, Jose Abreu wrote: > From: Jesper Dangaard Brouer > > > The page_pool DMA mapping cannot be "kept" when page traveling into the > > network stack attached to an SKB. (Ilias and I have a long term plan[1] > > to allow this, but you cannot do it ATM). > > The reason I recycle the page is this previous call to: > > skb_copy_to_linear_data() > > So, technically, I'm syncing to CPU the page(s) and then memcpy to a > previously allocated SKB ... So it's safe to just recycle the mapping I > think. > > Its kind of using bounce buffers and I do see performance gain in this > (I think the reason is because my setup uses swiotlb for DMA mapping). Maybe. Have you tested this on big/small packets? Can you do a test with 64b/128b and 1024b for example? The memcpy might be cheap for the small sized packets (and cheaper than the dma map/unmap) > > Anyway, I'm open to some suggestions on how to improve this ... > > > Also remember that the page_pool requires you driver to do the DMA-sync > > operation. I see a dma_sync_single_for_cpu(), but I didn't see a > > dma_sync_single_for_device() (well, I noticed one getting removed). > > (For some HW Ilias tells me that the dma_sync_single_for_device can be > > elided, so maybe this can still be correct for you). > > My HW just needs descriptors refilled which are in different coherent > region so I don't see any reason for dma_sync_single_for_device() ... I am abit overloaded at the moment. I'll try to have a look at this and get back to you Cheers /Ilias _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel