PATCH: Re: Helding the Kernel lock while doing IO???

From: Juan J. Quintela (quintela@fi.udc.es)
Date: Sun May 14 2000 - 17:02:45 EST


>>>>> "stephen" == Stephen C Tweedie <sct@redhat.com> writes:

stephen> Hi,
stephen> On Sat, May 06, 2000 at 03:30:47AM +0200, Juan J. Quintela wrote:
>>
>> read_swap_cache is called synchronously, then we can have to wait
>> until we read the page to liberate the lock kernel. It is intended?
>> I am losing some detail?

stephen> Holding the big kernel lock while we sleep is quite legal. The
stephen> scheduler drops the lock while we sleep and reacquires it when we
stephen> are rescheduled. The lock_kernel() lock is not at all like other
stephen> spinlocks.

Thanks again for the comment, what do you think about add a comment
about that? Patch attached.

Later, Juan.

diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude work/include/linux/smp_lock.h testing/include/linux/smp_lock.h
--- work/include/linux/smp_lock.h Sun May 14 20:20:41 2000
+++ testing/include/linux/smp_lock.h Mon May 15 00:00:29 2000
@@ -5,6 +5,11 @@
 
 #ifndef CONFIG_SMP
 
+/* We can hold the big kernel lock while we sleep. The scheduler
+ * drops the lock while we sleep and re-acquires it when we are
+ * rescheduled.
+ */
+
 #define lock_kernel() do { } while(0)
 #define unlock_kernel() do { } while(0)
 #define release_kernel_lock(task, cpu) do { } while(0)

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

- 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/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:25 EST