[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091223084253.GB25240@elte.hu>
Date: Wed, 23 Dec 2009 09:42:53 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Tejun Heo <tj@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>, awalls@...ix.net,
linux-kernel@...r.kernel.org, jeff@...zik.org,
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,
johannes@...solutions.net, andi@...stfloor.org
Subject: Re: workqueue thing
* Tejun Heo <tj@...nel.org> wrote:
> Hello, Ingo.
>
> On 12/23/2009 05:12 PM, Ingo Molnar wrote:
> >
> > * Ingo Molnar <mingo@...e.hu> wrote:
> >
> >> At least as far as i'm concerned, i'd like to see actual uses. It's a big
> >> linecount increase all things considered:
> >>
> >> 20 files changed, 2783 insertions(+), 660 deletions(-)
>
> BTW, the code contains way more comment afterwards and has other benefits
> like not having crazy number of workers around on many core machines.
(the original workqueue.c had way more comments as well.)
> >> and you say it _wont_ help performance/scalability (this aspect wasnt clear
>
> And I think it will help scalability for sure although it depends on
> what type of scalability you're talking about.
_I_ am not making any claims - i am simply asking what the benefits are, just
to move the discussion forward. If there are benefits, it must be measurable,
simple as that.
> >> to me from previous discussions), so the (yet to be seen) complexity
> >> reduction in other code ought to be worth it.
> >
> > To further stress this point, i'd like to point to the very first commit that
> > introduced kernel/workqueue.c into Linux 7 years ago:
> >
> > | From 6ed12ff83c765aeda7d38d3bf9df7d46d24bfb11 Mon Sep 17 00:00:00 2001
> > | From: Ingo Molnar <mingo@...e.hu>
> > | Date: Mon, 30 Sep 2002 22:17:42 -0700
> > | Subject: [PATCH] [PATCH] Workqueue Abstraction
> >
> > look at the diffstat of that commit:
> >
> > 201 files changed, 1102 insertions(+), 1194 deletions(-)
> >
> > despite adding a new abstraction and kernel subsystem (workqueues), that
> > commit modified more than a hundred drivers to make use of it, and managed to
> > achieve a net linecount decrease of 92 lines - despite adding hundreds of
> > lines of a new core facility.
> >
> > Likewise, for this particular patchset it should be possible to identify
> > existing patterns of code in the existing code base of 6+ millions lines of
> > Linux driver code that would make the advantages of this +2000 lines of core
> > kernel code plain obvious. There were multipe claims of problems with the
> > current abstractions - so there sure must be a way to show off the new code in
>
> I'm not sure I'm gonna update that many places in a single sweep but yeah
> let's give it a shot.
In all fairness the original workqueue.c had an advantage, that it basically
piggybacked on usable patterns from the tqueue (task-queue) abstraction - and
that was rather repetitive.
Your code adds a new _paradigm_ for which no easily reusable patterns exist -
so under no way are you expected to show such a massive amount of conversion -
just a handful of cases would be enough to show the benefits - we can
extrapolate from there.
It would also give us hands-on experience with the utility (and robustness) of
your proposal, so it's a win-win proposal IMO.
Thanks,
Ingo
--
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