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]
Message-ID: <20090306154144.GA7841@redhat.com>
Date:	Fri, 6 Mar 2009 16:41:44 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
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 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?

Oleg.

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