All of lore.kernel.org
 help / color / mirror / Atom feed
* BLK question
@ 2007-07-10  2:12 Diego Woitasen
  2007-07-10  6:19 ` pradeep singh
  2007-07-10 11:59 ` Matthew Wilcox
  0 siblings, 2 replies; 3+ messages in thread
From: Diego Woitasen @ 2007-07-10  2:12 UTC (permalink / raw)
  To: kernel-janitors


Hi,
	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".

	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?

	regards,
		diegows

-- 

--------------
Diego Woitasen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BLK question
  2007-07-10  2:12 BLK question Diego Woitasen
@ 2007-07-10  6:19 ` pradeep singh
  2007-07-10 11:59 ` Matthew Wilcox
  1 sibling, 0 replies; 3+ messages in thread
From: pradeep singh @ 2007-07-10  6:19 UTC (permalink / raw)
  To: kernel-janitors

On 7/10/07, Diego Woitasen <diego@woitasen.com.ar> wrote:
>
> Hi,
>         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".
deprecated not completely removed fully AFAICS.
It should go in near future.
You are not supposed to use BKL anymore i guess.

I am not the best person to ans that though :-/.

thanks
--pradeep
>
>         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?
>
>         regards,
>                 diegows
>
> --
>
> --------------
> Diego Woitasen
> -
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Pradeep

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BLK question
  2007-07-10  2:12 BLK question Diego Woitasen
  2007-07-10  6:19 ` pradeep singh
@ 2007-07-10 11:59 ` Matthew Wilcox
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2007-07-10 11:59 UTC (permalink / raw)
  To: kernel-janitors

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."

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-10 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10  2:12 BLK question Diego Woitasen
2007-07-10  6:19 ` pradeep singh
2007-07-10 11:59 ` Matthew Wilcox

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.