public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Sedat Dilek <sedat.dilek@gmail.com>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/softirq.c: delete 'while' looping to improve a little performance and beautify code
Date: Thu, 13 Jun 2013 10:10:33 +0800	[thread overview]
Message-ID: <51B92A19.9090700@asianux.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1306101613200.22970@ionos>

On 06/10/2013 10:15 PM, Thomas Gleixner wrote:
> On Sun, 9 Jun 2013, Chen Gang wrote:
>> > After finish the internal 'while', need not test TASKLET_STATE_SCHED
>> > again, so looping back to outside 'while' is only for set_bit().
>> > 
>> > When use 'if' and set_bit() instead of 'while', it will save at least
>> > one running conditional instruction, and also will be clearer for readers
>> > (although the binary size will be a little bigger).
> And by doing that you break the atomicity of test_and_set_bit. There
> is a good reason why this is an atomic operation and why the code is
> written as is.
>  

OK, thanks. it is my fault (and also sorry for replying late).

>> > The related patch is "1da177e Linux-2.6.12-rc2"
> How is that patch related to the problem?

Because the modification since Linux-2.6.12-rc2.


Thanks.
-- 
Chen Gang

Asianux Corporation

      reply	other threads:[~2013-06-13  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 12:30 [PATCH] kernel/softirq.c: delete 'while' looping to improve a little performance and beautify code Chen Gang
2013-06-10 12:25 ` Paul E. McKenney
2013-06-13  2:08   ` Chen Gang
2013-06-10 14:15 ` Thomas Gleixner
2013-06-13  2:10   ` Chen Gang [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=51B92A19.9090700@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=sedat.dilek@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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