linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Joe Marzot <gmarzot@nortelnetworks.com>
Cc: user-mode-linux-devel@lists.sourceforge.net,
	Randy Macleod <macleodr@nortelnetworks.com>
Subject: Re: [uml-devel] Q: UML thread communication - scheduling oddness
Date: Thu, 05 Aug 2004 13:23:45 -0400	[thread overview]
Message-ID: <200408051723.i75HNjCi003244@ccure.user-mode-linux.org> (raw)
In-Reply-To: Your message of "Thu, 05 Aug 2004 09:35:01 EDT." <41123785.5040004@nortelnetworks.com>

gmarzot@nortelnetworks.com said:
> Could you add a few sentences though on the delivery mechnisms for the
>  the packets to the kernel thread and to userspace. I saw a poll() on
> the  pollfds array which has the taps fd in it but this is a
> non-blocking  poll and I could not trace to how often it is called and
> what triggers  it - I also saw the sigio handler but I could not see
> who was generating  the SIGIO - is that how the userspace thread is
> woken up? 

OK, an incoming packet is handled this way:
	it's received by the host and routed to the tap device (or 
alternatively, it's received by the host eth, sent to the bridge that it's part
of, and copied to the tap device which is also in the bridge)
	it pops out of /dev/net/tun, which UML has a file descriptor open to
	the file descriptor is set up O_ASYNC, so that generates a SIGIO
	this causes sigio_handler to be called
	it looks at all of the descriptors in its care, and handles all the
ones that are now active
	the network driver's interrupt routine is called whenever a tap fd is
active, and it reads the frame off the fd and passes it to the UML network 
stack

sigio_handler does blocking polls because it knows that something is active,
and that it won't, in fact, block.

				Jeff



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-08-05 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04 20:10 [uml-devel] Q: UML thread communication - scheduling oddness Joe Marzot
2004-08-05  0:20 ` Jeff Dike
2004-08-05 13:31   ` Michael Richardson
2004-08-05 13:35   ` Joe Marzot
2004-08-05 17:23     ` Jeff Dike [this message]
2004-08-05 16:45   ` Joe Marzot
2004-08-05 19:17     ` Jeff Dike

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=200408051723.i75HNjCi003244@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=gmarzot@nortelnetworks.com \
    --cc=macleodr@nortelnetworks.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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