xfs
[Top] [All Lists]

Re: [PATCH 5/6] workqueue: introduce NR_WORKER_POOLS and for_each_worker

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 5/6] workqueue: introduce NR_WORKER_POOLS and for_each_worker_pool()
From: Tejun Heo <tj@xxxxxxxxxx>
Date: Fri, 13 Jul 2012 22:07:41 -0700
Cc: linux-kernel@xxxxxxxxxxxxxxx, joshhunt00@xxxxxxxxx, axboe@xxxxxxxxx, rni@xxxxxxxxxx, vgoyal@xxxxxxxxxx, vwadekar@xxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, swhiteho@xxxxxxxxxx, bpm@xxxxxxx, elder@xxxxxxxxxx, xfs@xxxxxxxxxxx, marcel@xxxxxxxxxxxx, gustavo@xxxxxxxxxxx, johan.hedberg@xxxxxxxxx, linux-bluetooth@xxxxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=nlFfeHnkjA3AoZhzgsZkN2V8pZvk/PgIC19UlDH5I4w=; b=aEZ48rN7b7GpsuDJ8Y/uuOdeJwAomy2tvDEM3QENxdTDQ0tgWqdld7qk4o/ouJOU/j gjPxw4VLczuLiQ00Rt8QPTMOuGERliFBNddNxjYEnc/ezu3PJpsyurdpmPF17kXh4OEo UtIsdCD/3iBJI8FsB/baQl3XgWZJ+J0imRYjUotJ4TQHjEX+y3gFsUHGWNhxGQGmzhZD 65I0VU7v4E+1ymanypYhcBzxfDLqxIQAlgRtazuc5O61vD4zICZjDnqkJ+H0/onQ1lJh UbaRe8DW6Ki2PVob2HiCSe9BNZnOETbBS50KoZAmdb2pVUi/+e7/qnA6jNRlKFzQ5wEK skwg==
In-reply-to: <CA+55aFyozbYJh4vRLCCkk5j86XEasngvWkKmL4WpBjiCB5050g@xxxxxxxxxxxxxx>
References: <1341859315-17759-1-git-send-email-tj@xxxxxxxxxx> <1341859315-17759-6-git-send-email-tj@xxxxxxxxxx> <20120714035538.GB5638@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CA+55aFyeauqCqrWsx4U2TB2ENrugZXYj+4vw3Fd0kGaeWBP3RA@xxxxxxxxxxxxxx> <20120714044438.GA7718@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CA+55aFyozbYJh4vRLCCkk5j86XEasngvWkKmL4WpBjiCB5050g@xxxxxxxxxxxxxx>
Sender: Tejun Heo <htejun@xxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
Hey, Linus.

On Fri, Jul 13, 2012 at 10:00:10PM -0700, Linus Torvalds wrote:
> On Fri, Jul 13, 2012 at 9:44 PM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> >
> > nr_running is atomic_t (*nr_running)[2].  Ignoring the pointer to
> > array part, it's just returning the address of N'th element of the
> > array.  ARRAY + N == &ARRAY[N].
> 
> None of this matters one whit.
> 
> You did "&(x)[0]".
> 
> That's insane. It's crazy. It doesn't even matter what "x" is in
> between, it's crazy regardless.

Eh, from my previous reply.

| Ah okay, you're looking at the fifth patch in isolation.  Upto this
| point, the index is always 0.  I'm puttin it in as a placeholder for
| the next patch which makes use of non-zero index.  This patch is
| supposed to prepare everything for multiple pools and thus non-zero
| index.

The patch is about converting stuff to handle size-1 array without
introducing any actual behavior change so that the next patch can bump
the array size and just change the index.

Thanks.

-- 
tejun

<Prev in Thread] Current Thread [Next in Thread>