lkml.org 
[lkml]   [2013]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/softirq.c: delete 'while' looping to improve a little performance and beautify code
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.

> The related patch is "1da177e Linux-2.6.12-rc2"

How is that patch related to the problem?

Thanks

tglx


\
 
 \ /
  Last update: 2013-06-10 16:41    [W:0.047 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site