Received: by 10.192.165.156 with SMTP id m28csp1510050imm; Wed, 18 Apr 2018 10:46:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx497tH0HLAkA516Atv0LVOeGIXQV73Ka+nMxefaReOOu8pUhoWG9IXS2g4CtCeT2DZtw6zqF X-Received: by 10.98.11.144 with SMTP id 16mr2824832pfl.228.1524073593302; Wed, 18 Apr 2018 10:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524073593; cv=none; d=google.com; s=arc-20160816; b=f2d9tFHsWX8ixOVkb5wqV8WCupkrzA5PgRmqpdzf+auI3gDK2jwTIdyC3eovQNVJrp F1KHOb3//Sf/zK/wINmL12th4beusJKAGTGANWqBFiSBS+BD1cRtFiKV90NzG7fQUzUz mFnmJAm7WHDyOEDunRQYbFu73HdBISjIvwweZENqbX4Zkqo0LvQyNGF7EtSPiIdrMIMf /KU2utW1ZiJk8B7B29uf6fXmd5sE6cnzqDRoX8mQJSmtxd+c0fJzVk3ARGgnaP/kfEXd WTmjsf/X4CvC/uz2MkxxOQjFaIyz75aKdYVbzhyWgOC5RGo2gX9B5iqjj9JRK4TosfVg xT+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=OaM5gdXK4KHTGDZeW6lHU1PqbLTS1WTmmCu7sV7xS0c=; b=r2FOqF6FDgJuXU89IZVS4G/vt8lelGGdiwQTPGMqPCqGm5cZLuoePQJRHYJ9+TwGb+ htotOhwmkFDdOYRsDKHVstQeeewXjviTaU1KVTKw3zQDKvpXR3ivFAMg+tV3BGasNy4D vhTboVCJdxqnHFBIp3oI/CY19B39EjY0iDZVVe/SE6Cgjd8vKlek5bCfDcB+Qppe0D6R GzjZBJOrUWITtytKrUBoeDa67SnjBy38jg9YLkvMmBNfdXC2FLFFLVFC+FuielXEc3w5 o8aFYXGv1hFTIR2aGB4NkVBq7B/vJoXwsgt/2Nf6xSHQJ+t39ZhoByChovRecKJegUNA VfXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13si1497387pgs.49.2018.04.18.10.46.19; Wed, 18 Apr 2018 10:46:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbeDRRpK (ORCPT + 99 others); Wed, 18 Apr 2018 13:45:10 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:46010 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbeDRRpJ (ORCPT ); Wed, 18 Apr 2018 13:45:09 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 565D014386337; Wed, 18 Apr 2018 10:45:08 -0700 (PDT) Date: Wed, 18 Apr 2018 13:45:07 -0400 (EDT) Message-Id: <20180418.134507.1436128340000357572.davem@davemloft.net> To: eric.dumazet@gmail.com Cc: mpatocka@redhat.com, edumazet@google.com, joby.poriyath@citrix.com, bhutchings@solarflare.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: don't use kvzalloc for DMA memory From: David Miller In-Reply-To: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> References: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 18 Apr 2018 10:45:08 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Dumazet Date: Wed, 18 Apr 2018 09:05:54 -0700 > Each virtio_net should probably allocate the exact amount of > DMA-memory it wants, instead of expecting core networking stack to > have a huge chunk of DMA-memory for everything. Yes, if you need DMA'able memory, allocate DMA'able memory separately and hang it off of the netdev instead of assuming you can just DMA in/out of it.