* page fault in cli / sti safe or not
@ 2000-03-30 4:37 pnilesh
2000-03-30 10:11 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: pnilesh @ 2000-03-30 4:37 UTC (permalink / raw)
To: linux-mm
I tried to page fault in cli () / sti() , but there was no deadlock. I
had perception that a deadlock would occur. However what might have I now
believe is that age fault always ocuur in any processes context , they will
panic in interrupt handler. So when a page fault occurs the page fault
handler is called and if the page is not found in the memory then a disk
read is scheduled the faulting process is put to sleep and schedule() is
called to run new process. The schedule () implicitly calls sti() and hence
there is no deadlock.
Please correct me if I am wrong.
Nilesh Patel
IBM Global Services India Pvt. Ltd.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: page fault in cli / sti safe or not
2000-03-30 4:37 page fault in cli / sti safe or not pnilesh
@ 2000-03-30 10:11 ` Andi Kleen
2000-03-30 21:15 ` Andrea Arcangeli
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2000-03-30 10:11 UTC (permalink / raw)
To: pnilesh; +Cc: linux-mm
On Thu, Mar 30, 2000 at 06:49:27AM +0200, pnilesh@in.ibm.com wrote:
> I tried to page fault in cli () / sti() , but there was no deadlock. I
> had perception that a deadlock would occur. However what might have I now
> believe is that age fault always ocuur in any processes context , they will
> panic in interrupt handler. So when a page fault occurs the page fault
> handler is called and if the page is not found in the memory then a disk
> read is scheduled the faulting process is put to sleep and schedule() is
> called to run new process. The schedule () implicitly calls sti() and hence
> there is no deadlock.
You are right. It does not make much sense though, because the locking
guarantee you wanted from cli() is broken. Also there is a bug in most
linux kernels that they do turn on the interrupts only after the
scheduler task queue has run. Some programs do a lot of work in
the scheduler tq (isdn4linux, reiserfs, in some cases the serial driver),
which can cause bad interrupt latencies (often leading the SMP TLB IPI
timed out messages on faster SMP boxes)
-Andi
--
This is like TV. I don't like TV.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: page fault in cli / sti safe or not
2000-03-30 10:11 ` Andi Kleen
@ 2000-03-30 21:15 ` Andrea Arcangeli
0 siblings, 0 replies; 3+ messages in thread
From: Andrea Arcangeli @ 2000-03-30 21:15 UTC (permalink / raw)
To: Andi Kleen; +Cc: pnilesh, linux-mm
On Thu, 30 Mar 2000, Andi Kleen wrote:
>On Thu, Mar 30, 2000 at 06:49:27AM +0200, pnilesh@in.ibm.com wrote:
>> I tried to page fault in cli () / sti() , but there was no deadlock. I
>> had perception that a deadlock would occur. However what might have I now
>> believe is that age fault always ocuur in any processes context , they will
>> panic in interrupt handler. So when a page fault occurs the page fault
>> handler is called and if the page is not found in the memory then a disk
>> read is scheduled the faulting process is put to sleep and schedule() is
>> called to run new process. The schedule () implicitly calls sti() and hence
>> there is no deadlock.
>
>You are right. It does not make much sense though, because the locking
>guarantee you wanted from cli() is broken. Also there is a bug in most
>linux kernels that they do turn on the interrupts only after the
>scheduler task queue has run. Some programs do a lot of work in
>the scheduler tq (isdn4linux, reiserfs, in some cases the serial driver),
>which can cause bad interrupt latencies (often leading the SMP TLB IPI
>timed out messages on faster SMP boxes)
for the record I uploaded the latest patch for the SMP TLB IPI here (it
fixes the thing Andi is talking about):
ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.15pre16/tq_scheduler-cli-1.gz
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-03-30 21:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-30 4:37 page fault in cli / sti safe or not pnilesh
2000-03-30 10:11 ` Andi Kleen
2000-03-30 21:15 ` Andrea Arcangeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox