[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0911171056380.9384@localhost.localdomain>
Date: Tue, 17 Nov 2009 11:01:33 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Tejun Heo <tj@...nel.org>
cc: Andy Walls <awalls@...ix.net>, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, jeff@...zik.org, mingo@...e.hu,
akpm@...ux-foundation.org, jens.axboe@...cle.com,
rusty@...tcorp.com.au, cl@...ux-foundation.org,
dhowells@...hat.com, arjan@...ux.intel.com, avi@...hat.com,
peterz@...radead.org, andi@...stfloor.org, fweisbec@...il.com
Subject: Re: [PATCH 17/21] workqueue: simple reimplementation of SINGLE_THREAD
workqueue
On Wed, 18 Nov 2009, Tejun Heo wrote:
>
> I might have been too early with the 'easy' part but I definitely can
> give it a shot. What do you think about the scheduler notifier
> implementation? It seems we'll end up with three callbacks. It can
> either be three hlist_heads in the struct_task linking each ops or
> single hilst_head links ops tables (like the current preempt
> notifiers). Which one should I go with?
I have to say that I don't know. Will this eventually be something common?
Is the cache footprint problem of 3 pointers that are usually empty worse
than the cache problem of following a chain where you don't use half the
entries? Who knows?
And when it actually _is_ used, is it going to be horrible to have a
possibly upredictable indirect branch (and on some architectures, _all_
indirect branches are unpredictable) in a really hot path?
In general, "notifiers" are always horrible. If there's only one or two
common cases, it's probably going to be better to hardcode those with
flags to be tested instead of following function pointers. So I just don't
know.
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