All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] WorkStruct: Shrink work_struct by two thirds
Date: Thu, 23 Nov 2006 14:59:32 +0000	[thread overview]
Message-ID: <10039.1164293972@redhat.com> (raw)
In-Reply-To: <20061122132008.2691bd9d.akpm@osdl.org>

Andrew Morton <akpm@osdl.org> wrote:

> waaaaaaaay too many rejects for me, sorry.  This is quite the worst time in
> the kernel cycle to be preparing patches like this.  Especially when they're
> against mainline when everyone has so much material pending.

Actually... there is a way to do this sort of incrementally, I think:

 (1) Turn this sort of thing:

	do_work(struct x *x)
	{
		...
	}

	queue_x(struct x *x)
	{
		INIT_WORK(&x->work, do_work, x);
		schedule_work(&x->work)
	}

    Into this sort of thing:

	#define DECLARE_IMMEDIATE_WORK(w, f) DECLARE_WORK((w), (f), (w))
	#define DECLARE_DELAYED_WORK(w, f) DECLARE_WORK((w), (f), (w))
	#define INIT_IMMEDIATE_WORK(w, f) INIT_WORK((w), (f), (w))
	#define INIT_DELAYED_WORK(w, f) INIT_WORK((w), (f), (w))

	do_work(struct work_struct *work)
	{
		struct x *x = container_of(work, struct x, work);
		...
	}

	queue_x(struct x *x)
	{
		INIT_IMMEDIATE_WORK(&x->work, do_work); //or
		INIT_DELAYED_WORK(&x->work, do_work);
		schedule_work(&x->work)
	}

 (2) Make delayed_work equivalent to work_struct:

	#define delayed_work work_struct

 (3) Then apply the rest of the patches such that they remove the #defines as
     appropriate.

Might that help?

David

  parent reply	other threads:[~2006-11-23 15:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22 13:02 [PATCH 0/5] WorkStruct: Shrink work_struct by two thirds David Howells
2006-11-22 13:02 ` [PATCH 1/5] WorkStruct: Separate delayable and non-delayable events. [try #2] David Howells
2006-11-22 13:02 ` [PATCH 2/5] WorkStruct: Typedef the work function prototype " David Howells
2006-11-22 13:02 ` [PATCH 3/5] WorkStruct: Merge the pending bit into the wq_data pointer " David Howells
2006-11-22 16:32   ` Randy Dunlap
2006-11-22 13:02 ` [PATCH 4/5] WorkStruct: Pass the work_struct pointer instead of context data " David Howells
2006-11-22 15:02 ` [PATCH 0/5] WorkStruct: Shrink work_struct by two thirds David Howells
2006-11-22 21:20 ` Andrew Morton
2006-11-23 11:44   ` David Howells
2006-11-23 17:25     ` Linus Torvalds
2006-11-23 20:01       ` David Howells
2006-11-23 21:40         ` Andrew Morton
2006-11-23 21:04           ` David Howells
2006-11-23 14:59   ` David Howells [this message]
2006-11-23 16:01     ` Stefan Richter
2006-12-05 19:52 ` [uml-devel] GIT pull on work_struct reduction tree David Howells
2006-12-05 19:52   ` David Howells
2006-12-05 20:16   ` [uml-devel] " Andrew Morton
2006-12-05 20:16     ` Andrew Morton
2006-12-05 21:05     ` [uml-devel] " Stefan Richter
2006-12-05 21:05       ` Stefan Richter
2006-12-05 21:41     ` [uml-devel] " David Howells
2006-12-05 21:41       ` David Howells
2006-12-06 15:06   ` David Howells

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=10039.1164293972@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.