From: Frederic Weisbecker <fweisbec@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] softirq: Use ffs in __do_softirq
Date: Mon, 9 Dec 2013 20:13:50 +0100 [thread overview]
Message-ID: <20131209191348.GB1811@localhost.localdomain> (raw)
In-Reply-To: <1386615406.8168.16.camel@joe-AO722>
On Mon, Dec 09, 2013 at 10:56:46AM -0800, Joe Perches wrote:
> On Mon, 2013-12-09 at 19:44 +0100, Frederic Weisbecker wrote:
> > On Sun, Nov 17, 2013 at 01:55:10AM -0800, Joe Perches wrote:
> > > Possible speed improvement of the __do_softirq function by using ffs
> > > instead of using a while loop with an & 1 test then single bit shift.
> []
> > Perhaps using for_each_set_bit() would simplify that more?
>
> It might simplify the appearance of the code but it
> would/could expand the amount of generated code because
> for_each_set_bit uses an address_of(unsigned long) and
> the value tested is an unsigned int.
>
> extra dereferences, can't be in a register, etc...
I'm not sure that would matter that much. But yeah it appears that find_first_bit/find_next_bit
aren't even overriden in x86. So they are function calls. Although I guess that most
of the time only one softirq is pending at a time.
But anyway perhaps we want that path to stay very optimized, so you're
patch look ok.
Thanks.
next prev parent reply other threads:[~2013-12-09 19:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 9:55 [PATCH 0/3] softirq: possible speedup and neatenings Joe Perches
2013-11-17 9:55 ` [PATCH 1/3] softirq: Use ffs in __do_softirq Joe Perches
2013-12-09 18:44 ` Frederic Weisbecker
2013-12-09 18:56 ` Joe Perches
2013-12-09 19:13 ` Frederic Weisbecker [this message]
2013-11-17 9:55 ` [PATCH 2/3] softirq: Convert printks to pr_<level> Joe Perches
2013-11-17 9:55 ` [PATCH 3/3] softirq: Use const char * const for softirq_to_name, whitespace neatening Joe Perches
2013-12-24 15:19 ` Wang YanQing
2013-12-24 15:27 ` Joe Perches
2013-12-09 17:22 ` [PATCH 0/3] softirq: possible speedup and neatenings Joe Perches
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=20131209191348.GB1811@localhost.localdomain \
--to=fweisbec@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox