[lkml]   [2006]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/5] WorkStruct: Shrink work_struct by two thirds
Andrew Morton <> 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);

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);

(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

Might that help?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-11-23 16:05    [W:0.102 / U:12.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site