From: Eric Dumazet <eric.dumazet@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
David Miller <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
netdev <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tom Herbert <therbert@google.com>
Subject: Re: [PATCH v2 net-next] softirq: reduce latencies
Date: Fri, 04 Jan 2013 09:00:24 -0800 [thread overview]
Message-ID: <1357318824.1678.1678.camel@edumazet-glaptop> (raw)
In-Reply-To: <1357290721.5452.55.camel@joe-AO722>
On Fri, 2013-01-04 at 01:12 -0800, Joe Perches wrote:
> On Fri, 2013-01-04 at 00:23 -0800, Eric Dumazet wrote:
> > On Fri, 2013-01-04 at 00:15 -0800, Joe Perches wrote:
> > > Perhaps MAX_SOFTIRQ_TIME should be
> > > #define MAX_SOFTIRQ_TIME msecs_to_jiffies(2)
> > > though it would be nicer if it were a compile time constant.
> >
> > If you send a patch to convert msecs_to_jiffies() to an inline function
> > when HZ = 1000, I will gladly use it instead of (2*HZ/1000)
> >
> > Right now, max(1, msecs_to_jiffies(2)) uses way too many instructions,
> > while it should be the constant 2, known at compile time.
>
> Something like this might work.
>
> This is incomplete, it just does msecs_to_jiffies,
> and it should convert usecs_to_jiffies and the
> jiffies_to_<foo> types too.
>
> Maybe it's worthwhile.
>
> It does reduce object size by 16 bytes per call site
> (x86-32) when the argument is a constant. There are
> about 800 of these jiffies conversions in kernel sources.
>
> What do you think?
>
I think this is something to discuss in another thread, and definitely
worth to do, at least for msecs_to_jiffies()
We have many HZ references everywhere that could be cleaned up using
this.
next prev parent reply other threads:[~2013-01-04 17:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 12:28 [PATCH net-next] softirq: reduce latencies Eric Dumazet
2013-01-03 20:46 ` Andrew Morton
2013-01-03 22:41 ` Eric Dumazet
2013-01-04 5:16 ` Namhyung Kim
2013-01-04 6:53 ` Eric Dumazet
[not found] ` <787701357283699@web24e.yandex.ru>
2013-01-04 7:46 ` Eric Dumazet
2013-01-03 22:08 ` Ben Hutchings
2013-01-03 22:40 ` Eric Dumazet
2013-01-04 7:49 ` [PATCH v2 " Eric Dumazet
2013-01-04 8:15 ` Joe Perches
2013-01-04 8:23 ` Eric Dumazet
2013-01-04 9:12 ` Joe Perches
2013-01-04 17:00 ` Eric Dumazet [this message]
2013-01-04 21:15 ` [PATCH] jiffies conversions: Use compile time constants when possible Joe Perches
2013-01-04 21:49 ` [PATCH v2 net-next] softirq: reduce latencies David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-01-05 8:58 Sedat Dilek
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=1357318824.1678.1678.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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