On Mon, Mar 11, 2002 at 06:15:13AM -0600, pwa wrote: > Is a critical region protected by a spinlock considered an interrupt > control path? > The spin_lock function seems to be doing nothin more than a > while(locked) > ; > > Consider the following code: > > spin_lock(&lock); > copy_to_user(buf, data, size); > spin_unlock(&lock); > > AFAIK if the process (#1) holding the spinlock blocks while calling > copy_to_user, schedule is > called. The next process (#2) tries to enter the critical region, and spins > on the lock. > If/when the pages requested by the copy_to_user are retrived from swap, an > interrupt should occur. > Schedule should mark #1 as running, and #1 should release the lock. ^^^^^^^^^^ this schedule will not occur since the spin_lock() etc. is a control path in kernel mode. Regards, Sourav > Is the problem here the unlikely(?) situation that the pages are not > retrivable from swap? > > -pwa. > > > > > > _____________________________________________ > Free email with personality! Over 200 domains! > http://www.MyOwnEmail.com _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/