From: horseriver <horserivers@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: netdev@vger.kernel.org
Subject: Re: when and where does ep_poll_callback be called ?
Date: Mon, 14 Jan 2013 15:52:57 +0800 [thread overview]
Message-ID: <20130114075257.GE4289@debian.localdomain> (raw)
In-Reply-To: <50F433D1.6070809@infradead.org>
On Mon, Jan 14, 2013 at 08:35:29AM -0800, Randy Dunlap wrote:
> On 01/13/13 17:11, horseriver wrote:
> > hi:
> >
> >
> > I'm studying the epoll module , I can not find ep_poll_callback be called somewhere .
>
>
> It's right there in fs/eventpoll.c:
>
>
> /*
> * This is the callback that is used to add our wait queue to the
> * target file wakeup lists.
> */
> static void ep_ptable_queue_proc(struct file *file, wait_queue_head_t *whead,
> poll_table *pt)
> {
> struct epitem *epi = ep_item_from_epqueue(pt);
> struct eppoll_entry *pwq;
>
> if (epi->nwait >= 0 && (pwq = kmem_cache_alloc(pwq_cache, GFP_KERNEL))) {
> >>>>> init_waitqueue_func_entry(&pwq->wait, ep_poll_callback);
Thanks!
I know this is setting the callbak function into watqueue . But not the called place .
I want to know the code which calls ep_poll_callback .
Perhaps , it is called at tcp layer when a datagram is reached . but I have not find that key code .
> pwq->whead = whead;
> pwq->base = epi;
> add_wait_queue(whead, &pwq->wait);
> list_add_tail(&pwq->llink, &epi->pwqlist);
> epi->nwait++;
>
>
>
> --
> ~Randy
next prev parent reply other threads:[~2013-01-14 17:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 1:11 when and where does ep_poll_callback be called ? horseriver
2013-01-14 16:35 ` Randy Dunlap
2013-01-14 7:52 ` horseriver [this message]
2013-03-13 5:00 ` Eric Dumazet
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=20130114075257.GE4289@debian.localdomain \
--to=horserivers@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.