From: Greg KH <greg@kroah.com>
To: Corey Minyard <minyard@acm.org>
Cc: Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] I2C patch 2 - break up the SMBus formatting
Date: Fri, 25 Feb 2005 15:00:14 -0800 [thread overview]
Message-ID: <20050225230014.GB28235@kroah.com> (raw)
In-Reply-To: <421FAACB.4080207@acm.org>
On Fri, Feb 25, 2005 at 04:46:35PM -0600, Corey Minyard wrote:
> Greg KH wrote:
>
> >On Thu, Feb 24, 2005 at 05:27:25PM -0600, Corey Minyard wrote:
> >
> >
> >>+
> >>+ /* It's wierd, but we use a usecount to track if an q entry is
> >>+ in use and when it should be reported back to the user. */
> >>+ atomic_t usecount;
> >>
> >>
> >
> >Please use a kref here instead of rolling your own.
> >
> >
> There's a trick I'm playing to avoid having to use a lock on the normal
> entry_put() case. It let's the entry_get() routine detect that the
> object is about to be destroyed. You can't do it with the current kref,
> but you could easily extend kref to allow it.
No, kref is ment to have an external lock protect it from this kind of
race. That's documented.
> It's simple to implement, but the documentation on how to use it will
> be 10 times larger than the code :).
>
> I'll work on a patch to kref to add that, if you don't mind.
I'll always look at patches :)
thanks,
greg k-h
prev parent reply other threads:[~2005-02-25 23:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-24 23:27 Corey Minyard
2005-02-25 21:41 ` Greg KH
2005-02-25 21:44 ` Greg KH
2005-02-25 22:46 ` Corey Minyard
2005-02-25 23:00 ` Greg KH [this message]
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=20050225230014.GB28235@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
/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
all inboxes | Powered by JetHome®