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]
Date:	Tue, 21 Nov 2006 10:06:42 +0000
From:	Christoph Hellwig <hch@...radead.org>
To:	Trond Myklebust <trond.myklebust@....uio.no>
Cc:	David Howells <dhowells@...hat.com>, torvalds@...l.org,
	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] WorkStruct: Shrink work_struct by two thirds

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.
-
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