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: <alpine.LFD.2.01.0910011257520.6996@localhost.localdomain>
Date:	Thu, 1 Oct 2009 13:03:36 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ingo Molnar <mingo@...e.hu>
cc:	Avi Kivity <avi@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Tejun Heo <tj@...nel.org>, jeff@...zik.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	jens.axboe@...cle.com, rusty@...tcorp.com.au,
	cl@...ux-foundation.org, dhowells@...hat.com, arjan@...ux.intel.com
Subject: Re: [PATCH 03/19] scheduler: implement workqueue scheduler class



On Thu, 1 Oct 2009, Ingo Molnar wrote:
> 
> Yeah. That scheme was hobbled by signal semantics: it looked hard to do 
> the 'flip a reserve thread with a blocked thread' trick in the scheduler 
> while still keeping all the signal details in place.

I think we should look at David Wheeler's advice: "Any problem in computer 
science can be solved with another level of indirection".

In particular, my favourite solution to this is to split "struct 
thread_struct" into a new part, which would be "CPU state". 

In other words, all threadlets would share one single "struct 
thread_struct" (and thus local signal state), but they would then each 
have a "struct cpu_state" associated with them, which includes the kernel 
stack. And that cpu_state thing would not be preempted, it would be 
something like a round-robin cooperative scheduling that is only invoced 
when a threadlet goes to sleep.

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