[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1282677230.10219.22.camel@wall-e.seibold.net>
Date: Tue, 24 Aug 2010 21:13:50 +0200
From: Stefani Seibold <stefani@...bold.net>
To: huang.ying.caritas@...il.com
Cc: Huang Ying <ying.huang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <andi@...stfloor.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC -v2] kfifo writer side lock-less support
> > > The patch adds only 1 field (unsigned int) to struct __kfifo. I think
> > > that should be acceptable. Because sizeof(struct __kfifo) should be much
> > > smaller that __kfifo->mask + 1 in most cases.
> >
> > I don't know what you mean with "because sizeof(struct __kfifo) should
> > be much smaller that __kfifo->mask + 1 in most cases". I am convinced
> > that you did not really understand the kfifo code. sizeof(struct
> > __kfifo) is constant and __kfifo->mask + 1 is the fifo size in elements,
> > which is not constant. Before you answering study the code first!
> >
> > And is not acceptable to bload the struct __kfifo, because it will never
> > need by the most users.
>
> I mean, for most user, __kfifo->mask + 1 > sizeof(struct __kfifo), so
> another 4 bytes for each user is relatively small.
>
You have no idea. As i wrote you should study the code before answering!
sizeof(struct __kfifo) is always 20 bytes on a 32 bit cpu, and
kfifo->mask +1 depends on the size of the number of fifo elements and it
is an initialization parameter.
If you will be able to shrink the footprint of the struct __kfifo,
whithout wasting the code, you are welcome to do.
Currently you generate only a lot of hot air. The assertion in your
"number of elements or bytes for kfifo_in etc" thread was also wrong.
You should first study code and understand it.
Until you have can prove your assertion by measurements and working
patches, please stop bothering.
- Stefani
--
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