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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E03266C.50408@kernel.dk>
Date:	Thu, 23 Jun 2011 13:41:32 +0200
From:	Jens Axboe <axboe@...nel.dk>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch 1/4] sched: Separate the scheduler entry for preemption

On 2011-06-22 22:15, Thomas Gleixner wrote:
> On Wed, 22 Jun 2011, Jens Axboe wrote:
> 
>> On 2011-06-22 20:43, Christoph Hellwig wrote:
>>> On Wed, Jun 22, 2011 at 05:52:13PM -0000, Thomas Gleixner wrote:
>>>> Block-IO and workqueues call into notifier functions from the
>>>> scheduler core code with interrupts and preemption disabled. These
>>>> calls should be made before entering the scheduler core.
>>>>
>>>> To simplify this, separate the scheduler core code into
>>>> __schedule(). __schedule() is directly called from the places which
>>>> set PREEMPT_ACTIVE and from schedule(). This allows us to add the work
>>>> checks into schedule(), so they are only called when a task voluntary
>>>> goes to sleep.
>>>
>>> I don't think that works.  We'll need to flush the block requests even
>>> for an involuntary schedule.
>>
>> Yep, doing it just for voluntary schedule() is pointless, since the
>> caller should just do the flushing on his own. The whole point of the
>> sched hook was to ensure that involuntary schedules flushed it.
> 
> I guess we talk about different things here. The involuntary is when

Seems to be the trend for this patchset, why stop now? :-)

> you are preempted, which keeps state unchanged and the current code
> already excludes that case.
> 
> If you block on a mutex, semaphore, completion or whatever that's a
> different thing. That code calls schedule() not __schedule() and that
> will flush your stuff as it does now.

OK, thanks for the clarification. You are right, the original kernel did
not flush on eg preempt and that wasn't the intent either. The intent
was to flush on block only. So behaviour remains identical.

-- 
Jens Axboe

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