From: Arnd Bergmann <arnd@arndb.de>
To: Stefani Seibold <stefani@seibold.net>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 0/2] new kfifo API
Date: Tue, 4 Aug 2009 15:45:37 +0200 [thread overview]
Message-ID: <200908041545.37329.arnd@arndb.de> (raw)
In-Reply-To: <1249389877.11474.14.camel@wall-e>
On Tuesday 04 August 2009, Stefani Seibold wrote:
> > Your second version is ok in this regard because it uses the original
> > size logic.
>
> Does it mean you like it now ;-) ???? I think we are on a good way!
It looks much better now, but I still think you are doing too many
things at once, and I disagree about the locking changes.
I think it would be best to have an incremental set of patches
to the original code, along the lines of
[PATCH 1/x] kfifo: preparation code reorg, no functional change
[PATCH 2/x] kfifo: add DEFINE_KFIFO and friends
[PATCH 3/x] kfifo: add kfifo_{to,from}_user
[PATCH 4/x] kfifo: add kfifo_{get,put}_rec
[PATCH 5/x] kfifo: ...
About the locking stuff, I think it should best be left in place.
The __kfifo_{get,put} functions should probably be declared part
of the official interface and documented as such -- people are
using them anyways. It's generally a good idea to have the obvious
interface work in an entirely safe way (kfifo_get doing all the
locking it might need), with a __foo variant of the same function
for people that want the extra performance and know what they are
doing.
I would also leave out the recsize argument, using an 'unsigned short'
for the record length unconditionally won't waste any real space but
simplifies both the implementation and the interface.
Finally, I don't see a reason for the optional KFIFO_F_NOTRIM argument.
If you have fixed records, I would guess that you always need it
anyway, so you could just make it the default and remove the function
argument.
Arnd <><
next prev parent reply other threads:[~2009-08-04 13:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 13:39 [RFC 0/2] new kfifo API Stefani Seibold
2009-08-03 14:42 ` Arnd Bergmann
2009-08-03 15:14 ` Stefani Seibold
2009-08-03 18:23 ` Arnd Bergmann
2009-08-03 18:45 ` Stefani Seibold
2009-08-03 16:41 ` Mike Christie
2009-08-03 18:27 ` Andi Kleen
2009-08-03 18:35 ` Arnd Bergmann
2009-08-03 18:48 ` Stefani Seibold
2009-08-03 19:00 ` Arnd Bergmann
2009-08-03 19:48 ` Stefani Seibold
2009-08-04 12:24 ` Arnd Bergmann
2009-08-04 12:44 ` Stefani Seibold
2009-08-04 13:45 ` Arnd Bergmann [this message]
2009-08-04 14:57 ` Stefani Seibold
2009-08-04 18:00 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908041545.37329.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stefani@seibold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox