2001-03-02 19:43:29

by Neelam Saboo

[permalink] [raw]
Subject: [Re: paging behavior in Linux]

hi,

After I installed a newer version of Kernel (2.4.2) and enable DMA option in
hardware configuration, the behavior changes.
I can see performance improvements when another thread is used. Also, i can
see timing overlaps between two threads. i.e. when one thread is blocked on a
page fault, other thread keeps working.
Now, how can this behavior be explained , given the earlier argument.
Is it that, a newer version of kernel has fixed the problem of the semaphore
?

thanks
neelam

> That's a known problem:
>
> The paging io for a process is controlled with a per-process semaphore.
> The semaphore is held while waiting for the actual io. Thus the paging
> in multi threaded applications is single threaded.
> Probably your prefetch thread is waiting for disk io, and the worker
> thread causes a minor pagefault --> worker thread sleeps until the disk
> io is completed.
>
> --
> Manfred


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1


2001-03-02 20:23:25

by Manfred Spraul

[permalink] [raw]
Subject: Re: [Re: paging behavior in Linux]

Neelam Saboo wrote:
>
> hi,
>
> After I installed a newer version of Kernel (2.4.2) and enable DMA option in
> hardware configuration, the behavior changes.
> I can see performance improvements when another thread is used. Also, i can
> see timing overlaps between two threads. i.e. when one thread is blocked on a
> page fault, other thread keeps working.
> Now, how can this behavior be explained , given the earlier argument.
> Is it that, a newer version of kernel has fixed the problem of the semaphore
> ?
>
No, that change won't happen until 2.5

I can only guess:
the other thread keeps working until it causes a page fault - with both
2.4.1 and 2.4.2.

I haven't followed the threads about the mm changes closely, but I
assume that the swapout behaviour changed, and that your worker thread
now runs without causing page faults.

--
Manfred

2001-03-03 01:49:48

by Jeremy Jackson

[permalink] [raw]
Subject: Re: [Re: paging behavior in Linux]

Manfred Spraul wrote:

> Neelam Saboo wrote:
> >
> > hi,
> >
> > After I installed a newer version of Kernel (2.4.2) and enable DMA option in

Ah hah! There's a huge difference in performance (in my experience) with
DMA. also, using hdparm utility, *most* drives work fine with dma,
irq unmasking, multisector transfers, and 32bit access.
hdparm -i /dev/hda or such will tell you maximum multisector supported.
the only reason these aren't enabled AFAIK is that SOME drives don't,
and when there's a problem it could cause data loss.

The worker thread may just have been overtaking the prefetcher
because dma was off and disk was slow.

>
> > hardware configuration, the behavior changes.
> > I can see performance improvements when another thread is used. Also, i can
> > see timing overlaps between two threads. i.e. when one thread is blocked on a
> > page fault, other thread keeps working.
> > Now, how can this behavior be explained , given the earlier argument.
> > Is it that, a newer version of kernel has fixed the problem of the semaphore
> > ?
> >
> No, that change won't happen until 2.5
>
> I can only guess:
> the other thread keeps working until it causes a page fault - with both
> 2.4.1 and 2.4.2.
>
> I haven't followed the threads about the mm changes closely, but I
> assume that the swapout behaviour changed, and that your worker thread
> now runs without causing page faults.