lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10039.1164293972@redhat.com>
Date:	Thu, 23 Nov 2006 14:59:32 +0000
From:	David Howells <dhowells@...hat.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	David Howells <dhowells@...hat.com>, torvalds@...l.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] WorkStruct: Shrink work_struct by two thirds 

Andrew Morton <akpm@...l.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
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ