lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Jun 2009 10:22:35 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Zhaolei <zhaolei@...fujitsu.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org, fweisbec@...il.com,
	Li Zefan <lizf@...fujitsu.com>,
	Xiao Guangrong <xiaoguangrong@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH RFC] softirq: fix ksoftirq starved

On Thu, 2009-06-18 at 11:19 +0800, Lai Jiangshan wrote:
> Ingo Molnar wrote:
> > * Lai Jiangshan <laijs@...fujitsu.com> wrote:
> > 
> >> --- a/kernel/sched.c
> >> +++ b/kernel/sched.c
> >> @@ -5307,6 +5307,7 @@ need_resched:
> >>  	release_kernel_lock(prev);
> >>  need_resched_nonpreemptible:
> >>  
> >> +	schedule_softirq_check();
> >>  	schedule_debug(prev);
> > 
> > hm, this slows down the scheduler fast-path ...
> > 
> > 	Ingo
> > 
> > 
> 
> It's true. But:
> 
> The overheads are:
> 
> Overhead-A: the function call statement "schedule_softirq_check();"
> It can be gotten rid off by a macro or inline function.
> 
> Overhead-B: __get_cpu_var() and the test statement.
> 
> Overhead-C: do_softirq()
> In my patch, we test a variable and then call do_softirq() when
> the variable is true. do_softirq() can be called from process
> context or from schedule() or by any other ways, but it must be
> called and avoids starvation in this condition.
> So we need pay this overhead. It is no worse than before.
> 
> Is it a critical thing when it slows down the scheduler fast-path
> because of the "Overhead-B"?
> 
> Or I misunderstand something?

I think its overhead-c, actually calling do_softirq from the schedule()
path that a really whacky idea.

Why not make whoemever needs the softirq to happen (eg. network ops)
poll this flag, so that regular RT processes don't get penalized by
random softirq muck?

It seems to me this approach basically gives softirqs higher prio than
RT processes, not something to be done lightly.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ