Linux-kernel mailing list archive 2000-26,: Re: owner field in `struct fs'

# Re: owner field in `struct fs'

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 24 Jun 2000 22:06:38 +0100 (BST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Chris Wedgwood: "Re: Why still no mmap ( MAP_ANON | MAP_SHARED ) allowed 2.2.14+?"
- Previous message: Richard Henderson: "Re: Re : 2.4.0-test2 doesn't compile"
- Next in thread: Philipp Rumpf: "Re: owner field in `struct fs'"
- Reply: Philipp Rumpf: "Re: owner field in `struct fs'"

> CPU1's old thread gets rescheduled on CPU2 (CPU1 stays frozen), eventually
> returns to userspace, CPU2 gets rescheduled after the down(&lock) in
> cleanup_module, cleanup_module finishes.
>
> Note this is completely equivalent to UP
>
> thread a thread b
> down(&lock);
> schedule();
> rmmod
> cleanup_module
> down(&lock)

Firstly why does it get scheduled on CPU2. What guarantee is there of that.
How will you handle the case when threads get pinned to a CPU in future.

The fundamental logic seems reasonable for simplistic cases. I think for
the complex case you need to allow cleanup_module to fail now - which isnt
a bad thing.

We even have a set of threads to deal with the freeze handling (its effectively
bumping the idle task to highest priority on all other cpus)

Harder question (which isnt currently solved)

CPU1 CPU2
rmmod ide
sleeping in cleanup module
open /dev/hda
????????

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Chris Wedgwood: "Re: Why still no mmap ( MAP_ANON | MAP_SHARED ) allowed 2.2.14+?"
- Previous message: Richard Henderson: "Re: Re : 2.4.0-test2 doesn't compile"
- Next in thread: Philipp Rumpf: "Re: owner field in `struct fs'"
- Reply: Philipp Rumpf: "Re: owner field in `struct fs'"