From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: therbert@google.com, xiaosuo@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] rps: immediate send IPI in process_backlog()
Date: Thu, 22 Apr 2010 09:28:23 +0200 [thread overview]
Message-ID: <1271921303.7895.4778.camel@edumazet-laptop> (raw)
In-Reply-To: <20100422.002118.107274505.davem@davemloft.net>
Le jeudi 22 avril 2010 à 00:21 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 21 Apr 2010 23:04:58 +0200
>
> > If some skb are queued to our backlog, we are delaying IPI sending at
> > the end of net_rx_action(), increasing latencies. This defeats the
> > queueing, since we want to quickly dispatch packets to the pool of
> > worker cpus, then eventually deeply process our packets.
> >
> > It's better to send IPI before processing our packets in upper layers,
> > from process_backlog().
> >
> > Change the _and_disable_irq suffix to _and_enable_irq(), since we enable
> > local irq in net_rps_action(), sorry for the confusion.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Eric, irqs are enabled in process_backlog(), so I don't know how legal
> it is to invoke net_rps_action_and_irq_enable() from there.
>
> At least, if you are depending upon a later action to pick up the
> pieces if the rps_ipi_list test races, you need to update the comment
> above net_rps_action_and_irq_enable() since it states that it is
> always invoked with IRQs disabled :-)
> --
But I do disable irqs berfore calling this function from
process_backlog, only if current pointer is non null.
Pointer is then re-fetched inside net_rps_action_and_irq_enable()
I thought using xchg(), but this adds an atomic op, so I think its
better to use local_irq_disable()/enable() pairs.
About the comment, it says :
/*
* net_rps_action sends any pending IPI's for rps.
* Note: called with local irq disabled, but exits with local irq
enabled.
*/
So it documents this function is called with irq disabled, and re-enable
them before return ?
prev parent reply other threads:[~2010-04-22 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 21:04 [PATCH net-next-2.6] rps: immediate send IPI in process_backlog() Eric Dumazet
2010-04-22 7:21 ` David Miller
2010-04-22 7:22 ` David Miller
2010-04-22 7:28 ` Eric Dumazet [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=1271921303.7895.4778.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=xiaosuo@gmail.com \
/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