Re: [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was: Strange performance behavior of 2.4.0-test9)

Jeff Garzik
2000-10-28T16:07:24Z

Andrew Morton wrote:
> --- linux-2.4.0-test10-pre5/fs/locks.c Tue Oct 24 21:34:13 2000
> +++ linux-akpm/fs/locks.c Sun Oct 29 02:31:10 2000
> @@ -125,10 +125,9 @@
> #include <asm/semaphore.h>
> #include <asm/uaccess.h>
>
> -DECLARE_MUTEX(file_lock_sem);
> -
> -#define acquire_fl_sem() down(&file_lock_sem)
> -#define release_fl_sem() up(&file_lock_sem)
> +spinlock_t file_lock_lock = SPIN_LOCK_UNLOCKED;
> +#define acquire_fl_lock() spin_lock(&file_lock_lock);
> +#define release_fl_lock() spin_unlock(&file_lock_lock);

It seems like better concurrency could be achieved with reader-writer
locks. Some of the lock test routines simply scan the list, without
modifying it.

--
Jeff Garzik | "Mind if I drive?" -Sam
Building 1024 | "Not if you don't mind me clawing at the
MandrakeSoft | dash and screaming like a cheerleader."
| -Max