From: Matthew Wilcox <matthew@wil.cx>
To: kernel-janitors@vger.kernel.org
Subject: Re: BLK question
Date: Tue, 10 Jul 2007 11:59:19 +0000 [thread overview]
Message-ID: <20070710115919.GM9704@parisc-linux.org> (raw)
In-Reply-To: <20070710021217.GB19502@motherbox.xtechq.com.ar>
On Mon, Jul 09, 2007 at 11:12:17PM -0300, Diego Woitasen wrote:
> I want to know is BLK is really deprecated. I see that is used
> in many places in the kernel, but the comments in the blk code
> say "Don't use in new code".
It really is deprecated, but it really is hard to get rid of too. We've
been trying since 2.1 (that's 1996).
> For example, reading the driver/pci/syscall.c I see that
> sys_pciconfig_write() and sys_pciconfig_read() use it to control
> the concurrency between these calls. Could this
> lock_kernel()/unlock_kernel() be replaced by a local mutex?
It's not that easy. lock_kernel() synchronises with *all* other places
that call lock_kernel(). There's no need for sys_pciconfig_write() and
sys_pciconfig_read() to be non-concurrent. It's a matter of both of
these routines needing to be safe against PCI device removal.
Now, things have changed since this code was first written. We should
be using pci_get_slot() and pci_dev_put() to hold a reference to the
pci_dev, and then we can get rid of the lock_kernel(). I'll send a
patch later today.
--
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
prev parent reply other threads:[~2007-07-10 11:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 2:12 BLK question Diego Woitasen
2007-07-10 6:19 ` pradeep singh
2007-07-10 11:59 ` Matthew Wilcox [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=20070710115919.GM9704@parisc-linux.org \
--to=matthew@wil.cx \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.