Re: flushing allocated kernel memory on disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 17, 2005 at 12:32:11 +0000, Vincenzo Mallozzi wrote:
> I've read somewhere that memory allocated in kernel space by means of 
> kmalloc/vmalloc instructions cannot be swapped out. 

Right, it can't.

> Now, I've a problem with memory usage as, when I execute my kernel module, the 
> amount of memory I need is greater than the system memory (384 MB RAM).

You have obviously done something wrong. Can't you just keep the data in
*userland*? It would make things a *lot* easier.

> I've also expanded swap memory to include all of the data structures my module 
> creates (up to 3.7 GB).

And did you also teach the module to swap the data?

> Is there a way to monitor the memory usage and, when memory is almost full, 
> force the flushing of unused parts of it in the swap partition?

There is the function that does the actual swapping for user memory, both
file backed and anonymous. I think it's called page_launder, or at least that
that symbol should point you to the right part of the code.

> I know this decrease system's performance but I don't worry about this.

Again, why do the data need to be in kernel. I am not saying there is no
reason for it, but could you explain what you are doing a bit? There may be
another solution.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux