0

I am working on a Linux driver on x86-64 CentOS 7. We have a kernel module which reads and writes into files . This module tries to get pages which are guaranteed to be contiguous. It works fine when I try smaller read/write jobs of 5 GB or 10 GB. I get correct kernel virtual address space pointers like 0xffff 8xxx xxxx xxxx
However if I try a bigger job /data (say 20 to 50 GB) then I get these address pointers which look like 0x0000 00xx xxxx xxxxx . These are not kernel virtual address space pointers.

Due to this I see a OS crash . However, if I clear cache frequency during the job by using echo 3 > /proc/sys/vm/drop_caches then it works fine and I get correct kernel virtual address space pointers.

My apologies for this vague type of question. Any hints and suggestion are welcome.

Thanks

vinod maverick
  • 670
  • 4
  • 14
stev
  • 182
  • 1
  • 11
  • It looks like your allocation failed. Is there a return status to check? – user3344003 Apr 26 '17 at 13:45
  • There is a return status check and allocation does not fail. It allocates at wrong location , once the cache is full. – stev Apr 27 '17 at 03:12
  • That sounds like a bug. It's not surprising that the kernel folks did not expect allocations of that size in the system space. – user3344003 Apr 27 '17 at 14:11
  • It works fine on CentOS 6.x . But it does not work when I migrate that to CentOS 7.x . Looks like something has changed in page caching and re-claim logic in 7.x onwards. – stev Apr 28 '17 at 03:16

0 Answers0