Re: [PATCH 1/2] tmpfs: Quick token library to allow scalableretrieval of tokens from token jar

From: Tim Chen
Date: Wed May 26 2010 - 15:35:52 EST


Andrew,

I've fixed the issues that you brought up for this patch series. I have
sent out version 2 patches in separate mails.
I've followed up on one of your comments below to explain why I'm doing
things done differently from your suggestions.

On Thu, 2010-05-20 at 16:08 -0700, Andrew Morton wrote:

> > +
> > +struct qtoken {
> > + long pool; /* pool of free tokens */
> > + long total; /* total num of tokens */
> > +#ifdef CONFIG_SMP
> > + long init_cache_sz; /* initial cache size */
>
> I don't think that it si meaningful for any of these things to have
> negative values, so an unsigned type would be more appropriate.
>
> Did they really need to be `long'? Plain old `unsigned' might be more
> efficient, perhaps.

I've changed "pool" and "total" to unsigned long. However, since tmpfs
uses unsigned long for the free blocks, I have to use unsigned long
instead of unsigned for the token jar to maintain compatibility with
tmpfs.


Thank you for your review.

Regards,
Tim Chen

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/