Re: vmalloc - kmalloc and page locks
From: Deas, Jim (James.Deas_at_warnerbros.com)
Date: Tue, 22 Jul 2003 06:57:26 -0700 To: firstname.lastname@example.org
Thanks for the clarification. I am using mlockall on the user application. This
still leaves me with the mystery of why my system usage goes from 3% to
50% randomly while playing data streams off the harddrive. I can also make
system usage stay at 50% by opening a third stream.
These streams are pulling data at 1.5MB/s each from different files (same HD).
I don't see that as a big strain on the hardware (4.5MB/s total data rate).
Where else should I look to find the bottleneck/latency issue?
From: Gábor Lénárt [mailto:email@example.com]
Sent: Tuesday, July 22, 2003 6:13 AM
To: Deas, Jim
Subject: Re: vmalloc - kmalloc and page locks
Errrrr ... Sorry, I did not read your mail carefully ;-(
I meant in case of a user process you can use mlock() and such :)
AFAIK the kernel itself is not pagable ...
On Tue, Jul 22, 2003 at 03:07:18PM +0200, Gábor Lénárt wrote:
> Please read something about the mlock() and/or mlockall() functions.
> The prototype can be found in [/usr/include/]sys/mman.h
> You can read there:
> /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
> be memory resident. */
> extern int mlock (__const void *__addr, size_t __len) __THROW;
> /* Cause all currently mapped pages of the process to be memory resident
> until unlocked by a call to the `munlockall', until the process exits,
> or until the process calls `execve'. */
> extern int mlockall (int __flags) __THROW;
> On Tue, Jul 22, 2003 at 06:00:14AM -0700, Deas, Jim wrote:
> > How can I look at what memory are being paged out of memory in the kernel
> > or how to lock kmalloc and vmalloc pages so they do not get put to swap?
> - Gábor (larta'H)
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to firstname.lastname@example.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
-- - Gábor (larta'H) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/