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: <20150511171109.46e07c67@notabene.brown>
Date:	Mon, 11 May 2015 17:11:09 +1000
From:	NeilBrown <neilb@...e.de>
To:	Julian Anastasov <ja@....bg>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: Introduce TASK_NOLOAD and TASK_IDLE

On Sat, 9 May 2015 11:49:01 +0300 (EEST) Julian Anastasov <ja@....bg> wrote:

> 
> 	Hello,
> 
> On Fri, 8 May 2015, Peter Zijlstra wrote:
> 
> > Subject: sched: Introduce TASK_NOLOAD and TASK_IDLE
> > From: Peter Zijlstra <peterz@...radead.org>
> > Date: Fri May 8 14:23:45 CEST 2015
> > 
> > Currently people use TASK_INTERRUPTIBLE to idle kthreads and wait for
> > 'work' because TASK_UNINTERRUPTIBLE contributes to the loadavg. Having
> > all idle kthreads contribute to the loadavg is somewhat silly.
> > 
> > Now mostly this works OK, because kthreads have all their signals
> > masked. However there's a few sites where this is causing problems and
> > TASK_UNINTERRUPTIBLE should be used, except for that loadavg issue.
> > 
> > This patch adds TASK_NOLOAD which, when combined with
> > TASK_UNINTERRUPTIBLE avoids the loadavg accounting.
> > 
> > As most of imagined usage sites are loops where a thread wants to
> > idle, waiting for work, a helper TASK_IDLE is introduced.
> 
> 	After checking our code in net/netfilter/ipvs/ip_vs_sync.c,
> sync_thread_master(), we may also need some wrappers:
> 
> - schedule_timeout_idle (instead of schedule_timeout call):
> 	__set_current_state(TASK_IDLE);
> 	return schedule_timeout(timeout);
> 
> 	- we here are really idle, so "N" looks ok

yes, I would want
 wait_event_idle_timeout() and wait_event_idle()

but I'll be happy to take whatever I can get :-)

Thanks,
NeilBrown


> 
> - pair of __wait_event_idle(wq, condition) and
> 	wait_event_idle(wq, condition) macros
> 
> 	- we here are write-blocked for socket, not sure
> 	if this blocked vs idle difference is useful to
> 	represent, in new bit for this blocked state "B"=2048,
> 	with 2 TASK_NOLOAD variants: N(idle) and B(blocked,
> 	2|1024|2048, eg. for read-blocked or write-blocked).
> 	It will need additional argument 'state'/'blocked' for 
> 	*wait_event_idle().
> 
> Regards
> 
> --
> Julian Anastasov <ja@....bg>


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ