question about kref API

'Greg KH' greg at kroah.com
Wed Jul 23 14:32:27 EDT 2014


On Wed, Jul 23, 2014 at 05:55:50PM +0000, Jeff Haran wrote:
> > -----Original Message-----
> > From: 'Greg KH' [mailto:greg at kroah.com]
> > Sent: Wednesday, July 23, 2014 10:48 AM
> > To: Jeff Haran
> > Cc: kernelnewbies at kernelnewbies.org
> > Subject: Re: question about kref API
> > 
> > On Wed, Jul 23, 2014 at 05:33:19PM +0000, Jeff Haran wrote:
> > > Clearly there are potential performance benefits in not needing to
> > > take locks or mutexes when they are not necessary.
> > 
> > Of course there are.  But trust me, you need to use a lock here, as the
> > document tries to explain, otherwise your code is broken.
> > 
> > > If you could elaborate on where the race condition is here, I think
> > > you'd being doing both me and the community a great service.
> > 
> > Nice try with the "Do it for the community because I don't understand this!"
> > appeal, that doesn't work for me, sorry...
> 
> Boy, I try to be as deferential as possible here and you come back
> with this snarky response.

Snarky?  You were asking me to take time and personally walk you through
the kref code and your misconceptions of it.  I've written this
document, given numerous presentations on it, wrote a published
conference paper on the topic, as well as maintining the kernel code for
over a decade now.  Trying to say "do it for the community" implies my
previous work was somehow insufficient and I should do more to appease
your specific need.

And that need is still unknown to me, you never said _why_ you wanted to
understand the kref code.  Which is important to me.

> My experience is when software developers can't or won't explain how
> their code works, it's because they don't understand it themselves.

Yeah, that's it, really, I don't understand it at all, talk about snark :)

I asked you to read the in-kernel usage of the code, instead of this
contrived example code, which you didn't do.

I asked you to provide a use-case or example of where you wanted to use
this code, which you didn't do.

Instead you insist that I educate you without doing much work on your
own, which is not how a community works, sorry.

Best of luck in your education process.

greg k-h



More information about the Kernelnewbies mailing list