From: Andrew Morton <akpm@osdl.org>
To: johnpol@2ka.mipt.ru
Cc: linux-kernel@vger.kernel.org
Subject: Re: cn_queue.c
Date: Fri, 1 Apr 2005 01:50:27 -0800 [thread overview]
Message-ID: <20050401015027.047783eb.akpm@osdl.org> (raw)
In-Reply-To: <1112348048.9334.174.camel@uganda>
Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
>
> cn_queue_free_dev() will wait until dev->refcnt hits zero
> before freeing any resources,
> but it can happen only after cn_queue_del_callback() does
> it's work on given callback device [actually when all callbacks
> are removed].
> When new callback is added into device, it's refcnt is incremented
> [before adition btw, if addition fails in the middle, reference is
> decremented], when callbak is removed, device's reference counter
> is decremented aromically after all work is finished.
hm.
How come cn_queue_del_callback() uses all those barriers if no other CPU
can grab new references against cbq->cb->refcnt?
cn_queue_free_callback() forgot to do flush_workqueue(), so
cn_queue_wrapper() can still be running while cn_queue_free_callback()
frees up the cn_callback_entry, I think.
next prev parent reply other threads:[~2005-04-01 9:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-01 1:32 cn_queue.c Andrew Morton
2005-04-01 7:40 ` cn_queue.c Evgeniy Polyakov
2005-04-01 7:57 ` cn_queue.c Andrew Morton
2005-04-01 8:40 ` cn_queue.c Evgeniy Polyakov
2005-04-01 8:48 ` cn_queue.c Andrew Morton
2005-04-01 9:34 ` cn_queue.c Evgeniy Polyakov
2005-04-01 9:50 ` Andrew Morton [this message]
2005-04-01 10:36 ` cn_queue.c Evgeniy Polyakov
2005-04-01 10:43 ` cn_queue.c Andrew Morton
2005-04-01 11:12 ` cn_queue.c Evgeniy Polyakov
2005-04-01 11:15 ` cn_queue.c Evgeniy Polyakov
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=20050401015027.047783eb.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.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