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: <20110526114406.GG9715@htj.dyndns.org>
Date:	Thu, 26 May 2011 13:44:06 +0200
From:	Tejun Heo <tj@...nel.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	Ying Han <yinghan@...gle.com>,
	"nishimura@....nes.nec.co.jp" <nishimura@....nes.nec.co.jp>,
	"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>
Subject: Re: [RFC][PATCH v3 7/10] workqueue: add WQ_IDLEPRI

Hello,

On Thu, May 26, 2011 at 07:50:19PM +0900, KAMEZAWA Hiroyuki wrote:
> On Thu, 26 May 2011 19:30:18 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> > In the next version, I'll try some like..
> > ==
> > 	process_one_work(...) {
> > 		.....
> > 		spin_unlock_irq(&gcwq->lock);
> > 		.....
> > 		if (cwq->wq->flags & WQ_IDLEPRI) {
> > 			set_scheduler(...SCHED_IDLE...)
> > 			cond_resched();
> > 			scheduler_switched = true;
> > 		}
> > 		f(work) 
> > 		if (scheduler_switched)
> > 			set_scheduler(...SCHED_OTHER...)
> > 		spin_lock_irq(&gcwq->lock);
> > 	}
> > ==
> > Patch size will be much smaller. (Should I do this in memcg's code ??)
> > 
> 
> BTW, my concern is that if f(work) is enough short,effect of SCHED_IDLE will never
> be found because SCHED_OTHER -> SCHED_IDLE -> SCHED_OTHER switch is very fast.
> Changed "weight" of CFQ never affects the next calculation of vruntime..of the
> thread and the work will show the same behavior with SCHED_OTHER.
> 
> I'm sorry if I misunderstand CFQ and setscheduler().

Hmm... I'm not too familiar there either but,

* If prio is lowered (you're gonna lower it too, right?),
  prio_changed_fair() is called which in turn does resched_task() as
  necessary.

* More importantly, for short work items, it's likely to not matter at
  all.  If you can determine beforehand that it's not gonna take very
  long time, queueing on system_wq would be more efficient.

Thanks.

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