Re: How can I shrink the Linux page cache from within kernel space?

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

 



2015-08-11 8:25 GMT-03:00 David Sorber <david.sorber@xxxxxxxxx>:
> For example, on the last failure that I captured the page cache filled 27 GB
> of the 32 GB of RAM on my system. I suspected that the page cache "fullness"
> was causing dma_alloc_coherent calls to fail. To test this theory I manually
> emptied the page cache using:
>
> # echo 1 > /proc/sys/vm/drop_caches
>
> This dropped the size of the cache from 27 GB to 94 MB and I was able to
> allocate 20+ 1 GB DMA buffers with no issues.
>
> Clearly the page cache is a beneficial thing so I would prefer not to have
> to completely empty it every time I run out of space when allocating DMA
> buffers. My questions is this: how can I dynamically shrink the page cache
> in kernel space such that if a call to dma_alloc_coherent fails I can
> recover just enough space so that I can retry the call and have it succeed?

> Any assistance with this would be greatly appreciated!

The Linux memory management is not very good yet. Was researching more
about the file system BTRFS is better.

-- 
Albino B Neto
www.bino.us
"Debian. Freedom to code. Code to freedom!" faw

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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