Re: [RFC -v2] kfifo writer side lock-less support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Huang Ying
Date: Tuesday, August 24, 2010 - 1:43 am

On Tue, 2010-08-24 at 15:55 +0800, Stefani Seibold wrote:

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.

For macros, only INIT_KFIFO, kfifo_reset and kfifo_put is enlarged a
little (one instruction?).

And yes, I added some new functions and macros. But if I implement
another ring buffer instead of making kfifo lock-less (for multiple
writers), I need to implement more functions and macros, the code size
increment will be larger, isn't it?


After we reach the consensus on the general idea, we can look at these
issues one by one.


I really need multiple-writers and one reader in APEI GHES support, and
I need lock-less in writer side (because the buffer need to be written
in NMI handler). So I can not use the original kfifo implementation.


There is at least one user. I will post the corresponding patches later.

Best Regards,
Huang Ying


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC -v2] kfifo writer side lock-less support, Huang Ying, (Mon Aug 23, 6:42 pm)
Re: [RFC -v2] kfifo writer side lock-less support, Stefani Seibold, (Tue Aug 24, 12:55 am)
Re: [RFC -v2] kfifo writer side lock-less support, Huang Ying, (Tue Aug 24, 1:43 am)
Re: [RFC -v2] kfifo writer side lock-less support, Stefani Seibold, (Tue Aug 24, 2:04 am)
Re: [RFC -v2] kfifo writer side lock-less support, Huang Ying, (Tue Aug 24, 5:50 am)
Re: [RFC -v2] kfifo writer side lock-less support, Stefani Seibold, (Tue Aug 24, 12:13 pm)
Re: [RFC -v2] kfifo writer side lock-less support, Huang Ying, (Tue Aug 24, 5:38 pm)
Re: [RFC -v2] kfifo writer side lock-less support, Huang Ying, (Wed Aug 25, 1:40 am)