Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Jiri Pirko <jpirko@redhat.com>,
	Don, Cong Wang <amwang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	e1000-devel@lists.sourceforge.net,
	Dean Nelson <dnelson@redhat.com>,
	Bruce Allan <bruce.w.allan@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	linux-kernel@vger.kernel.org,
	John Ronciak <john.ronciak@intel.com>,
	netdev@vger.kernel.org, akpm@linux-foundation.org,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
Date: Mon, 28 Nov 2011 19:26:40 +0100	[thread overview]
Message-ID: <1322504800.2970.5.camel@edumazet-laptop> (raw)
In-Reply-To: <4ED3CD8B.5060000@intel.com>

Le lundi 28 novembre 2011 à 10:06 -0800, Alexander Duyck a écrit :
> On 11/27/2011 12:07 AM, Eric Dumazet wrote:
> > But why are these drivers using kmap_atomic() in first place, since
> > their fragments are allocated in regular zone (GFP_ATOMIC or
> > GFP_KERNEL) ?
> 
> I was asking the same thing myself recently when I started working on
> some copy-break like code for the ixgbe driver.  I believe the main
> reason is a lack of documentation.  This code is based loosely on the
> skb_copy_bits code which will use kmap_skb_frag over all of the paged
> portions of the sk_buff.  As such it was decided to map things via
> kmap_atomic in order to guarantee the pages had a valid virtual address.
> 
> If I understand things correctly, what you are brining up is that pages
> allocated with either GFP_ATOMIC or GFP_KERNEL will always be allocated
> from the lowmem pool and as such page_address should always succeed.  Is
> that correct?
> 

Yes.

Either you could :

A) allocate high memory pages to lower pressure on LOWMEM area on 32bit
kernels.

B) avoid using kmap_atomic() & kunmap_atomic() and be faster on 32bit
kernels.

	skb_put(skb, length);
	memcpy(skb->data, page_address(buffer_info->page), length);

 




------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  reply	other threads:[~2011-11-28 18:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
2011-11-27  6:12   ` David Miller
2011-11-27  8:07   ` Eric Dumazet
2011-11-28 18:06     ` Alexander Duyck
2011-11-28 18:26       ` Eric Dumazet [this message]
2011-11-28  7:39   ` Cong Wang
2011-11-28  7:48   ` [UPDATED PATCH " Cong Wang
2011-11-27  5:27 ` [PATCH 28/62] vhost: " Cong Wang
2011-11-27  5:27 ` [PATCH 53/62] net: " Cong Wang
2011-11-27  6:12   ` David Miller
2011-11-27  5:27 ` [PATCH 54/62] rds: " Cong Wang
2011-11-27  6:13   ` David Miller
2011-11-27  5:27 ` [PATCH 55/62] sunrpc: " Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322504800.2970.5.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@intel.com \
    --cc=amwang@redhat.com \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=dnelson@redhat.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=ian.campbell@citrix.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=jpirko@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox