[Devel] [PATCH 1/2] sched: introduce cond_resched_may_throttle

Vladimir Davydov vdavydov at virtuozzo.com
Mon Jan 11 09:28:25 PST 2016


On Mon, Jan 11, 2016 at 08:15:35PM +0300, Kirill Tkhai wrote:
> @@ -1246,6 +1246,7 @@ struct task_struct {
>  	unsigned sched_interruptible_sleep:1;
>  
>  	unsigned woken_while_running:1;
> +	unsigned may_throttle:1;

[off-topic]

There's a potential problem with these bitfields AFAIU - not all of them
are set from the current context (e.g. sched_interruptible_sleep is
protected by task_struct->pi_lock IIRC). This might result in funky
crashes. There was an attempt of fixing this upstream:

http://www.spinics.net/lists/linux-mm/msg99483.html

Do you think it's worth backporting?


More information about the Devel mailing list