public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: David Howells <dhowells@redhat.com>,
	torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] WorkStruct: Shrink work_struct by two thirds
Date: Tue, 21 Nov 2006 10:06:42 +0000	[thread overview]
Message-ID: <20061121100642.GA580@infradead.org> (raw)
In-Reply-To: <1164040326.5700.46.camel@lade.trondhjem.org>

On Mon, Nov 20, 2006 at 11:32:06AM -0500, Trond Myklebust wrote:
> On Mon, 2006-11-20 at 14:27 +0000, David Howells wrote:
> > 
> > The workqueue struct is huge, and this limits it's usefulness.  On a 64-bit
> > architecture it's nearly 100 bytes in size, of which the timer_list is half.
> > These patches shrink work_struct by 8 of the 12 words it ordinarily consumes.
> > This is done by:
> > 
> >  (1) Splitting the timer out so that delayable work items are defined by a
> >      separate structure which incorporates a basic work_struct and a timer.
> 
> Why not simply add a timer argument to 'queue_delayed_work()' and
> 'cancel_delayed_work()'? That may allow you to reuse an existing timer
> struct if you already have it embedded somewhere else.

I doubt we can really reuse an existing timer, but this seems to be
the cleanest way despite that.  Let's follow the philosophy of builing
from small building blocks for our kernel APIs aswell.

Doing it this way will also ease the transition, we can the new API
that takes a timer first and then once all old queue_delayed_work users
are gone remove that API and the timer from work_struct.

As a second benefit it also makes handling the case of having both delayed
and immediate items on a single workqueue trivial.

  reply	other threads:[~2006-11-21 10:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-20 14:27 [PATCH 0/4] WorkStruct: Shrink work_struct by two thirds David Howells
2006-11-20 14:27 ` [PATCH 1/4] WorkStruct: Separate delayable and non-delayable events David Howells
2006-11-20 15:35   ` Stefan Richter
2006-11-20 15:43     ` David Howells
2006-11-20 18:32     ` Linus Torvalds
2006-11-21 11:30       ` David Howells
2006-11-20 14:27 ` [PATCH 2/4] WorkStruct: Typedef the work function prototype David Howells
2006-11-20 15:38   ` Stefan Richter
2006-11-20 15:47     ` David Howells
2006-11-20 16:13       ` Stefan Richter
2006-11-21 14:53       ` Jan Engelhardt
2006-11-20 14:27 ` [PATCH 3/4] WorkStruct: Merge the pending bit into the wq_data pointer David Howells
2006-11-21  0:34   ` Randy Dunlap
2006-11-20 14:27 ` [PATCH 4/4] WorkStruct: Pass the work_struct pointer instead of context data David Howells
2006-11-20 16:32 ` [PATCH 0/4] WorkStruct: Shrink work_struct by two thirds Trond Myklebust
2006-11-21 10:06   ` Christoph Hellwig [this message]
2006-11-21 11:08     ` David Howells
2006-11-20 19:17 ` Andrew Morton
2006-11-21 11:28   ` David Howells
2006-11-21 13:09   ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061121100642.GA580@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox