linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: P@draigBrady.com
To: Gianni Tedesco <gianni@scaramanga.co.uk>
Cc: Oliver Dain <omd1@cornell.edu>, linux-kernel@vger.kernel.org
Subject: Re: CONFIG_PACKET_MMAP revisited
Date: Thu, 06 Nov 2003 15:29:41 +0000	[thread overview]
Message-ID: <3FAA68E5.9070804@draigBrady.com> (raw)
In-Reply-To: <1068129060.530.1438.camel@lemsip>

Gianni Tedesco wrote:
> On Thu, 2003-11-06 at 15:13, Oliver Dain wrote:
> 
>>It seems to me that it can't loop in user mode forever.  There is no way to 
>>get data into user mode (the ring buffer) witout going through the kernel.  
>>My understanding is that the NIC doesn't transfer directly to the user mode 
>>ring buffer, but rather to a different DMA buffer.  The kernel must copy it 
>>from the DMA buffer to the ring buffer. Thus once the user mode app has 
>>processed all the data in the ring buffer the kenel _must_ get involved to 
>>get more data to user space.  Currently the data gets there because the NIC 
>>produces an interrupt for each packet (or for every few packets) and when the 
>>kernel handles these the data is copied to user space.  Then, as you point 
>>out, the cost of the RETI can't be avoided.  
> 
> 
> yes, in interrupt context. My point is that that *task* will never go in
> to kernel mode, it will always be running in user mode.

In my experience (PIII 1.2GHz, i815, e100, NAPI), user mode
would read at most 7 packets at a time, even when artificial
busy loops insterted. The max packet rate acheived was
around 120Kpps, but that was limited at the driver level.
Most of the CPU was consumed while doing this (measured with
cyclesoak, especially required since NAPI was used).

Pádraig.


      reply	other threads:[~2003-11-06 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-29  4:09 CONFIG_PACKET_MMAP revisited odain2
2003-10-29  4:50 ` Jamie Lokier
2003-11-06 11:08 ` Gianni Tedesco
2003-11-06 14:13   ` Oliver Dain
2003-11-06 14:31     ` Gianni Tedesco
2003-11-06 15:29       ` P [this message]

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=3FAA68E5.9070804@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=gianni@scaramanga.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omd1@cornell.edu \
    /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;
as well as URLs for NNTP newsgroup(s).