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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 06 Mar 2009 16:47:04 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	Nick Piggin <npiggin@...e.de>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH]: wait: don't resched in prepare_to_wait()

On Fri, 2009-03-06 at 16:41 +0100, Oleg Nesterov wrote:
> On 03/06, Peter Zijlstra wrote:
> >
> > After prepare to wait, we either call schedule() or find !cond in which
> > case we'll call finish_wait() which contains another preemption check.
> >
> > @@ -73,7 +73,9 @@ prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state)
> >  	if (list_empty(&wait->task_list))
> >  		__add_wait_queue(q, wait);
> >  	set_current_state(state);
> > +	preempt_disable();
> >  	spin_unlock_irqrestore(&q->lock, flags);
> > +	preempt_enable_no_resched();
> 
> But this only helps if the task gets TIF_NEED_RESCHED while it was in
> spin_lock_irqsave() section, right? This window should be very small
> unless we have the contention.
> 
> Or do you have something else in mind?

No, that was exactly it, we then get preempted only to go to sleep right
afterwards, which would cause a schedule anyway.

So its avoiding a schedule.

--
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