title: kmalloc fails eventhough lowfree is around 523MB
body: <p>I am currently working on one embedded development board.<br>
  I have ported 3.0.31 kernel with my personal patches on it.</p>
  
  <p>When I am trying to insert my module, it fails to allocate 4MB memory using <b><code>kmalloc()</code></b>.</p>
  
  <p>Below is output of <b><code>$ cat /proc/meminfo</code></b> command executed on development board.</p>
  
  <pre><code>MemTotal:         899252 kB  
  MemFree:          524136 kB  
  Buffers:            3540 kB  
  Cached:            20124 kB  
  SwapCached:            0 kB  
  Active:            37308 kB  
  Inactive:          21008 kB  
  Active(anon):      34852 kB  
  Inactive(anon):      160 kB  
  Active(file):       2456 kB  
  Inactive(file):    20848 kB  
  Unevictable:           0 kB  
  Mlocked:               0 kB  
  HighTotal:         31744 kB  
  HighFree:            308 kB  
  LowTotal:         867508 kB  
  LowFree:          523828 kB  &lt;--------
  SwapTotal:             0 kB  
  SwapFree:              0 kB  
  Dirty:                 0 kB  
  Writeback:             0 kB  
  AnonPages:         33232 kB  
  Mapped:             6336 kB  
  Shmem:               360 kB  
  Slab:              64652 kB  
  SReclaimable:       2972 kB  
  SUnreclaim:        61680 kB  
  KernelStack:        1528 kB  
  PageTables:         1884 kB  
  NFS_Unstable:          0 kB  
  Bounce:                0 kB  
  WritebackTmp:          0 kB  
  CommitLimit:      449624 kB  
  Committed_AS:     532552 kB  
  VmallocTotal:     122880 kB  
  VmallocUsed:       38440 kB  
  VmallocChunk:      70436 kB
  </code></pre>
  
  <p>According to my understanding, LowFree parameter indicates free memory in kernel space which is around 523MB in this case.</p>
  
  <p><b>There is a lot free space available in kernel space then why module fails in kmalloc of 4MB? </b></p>