Re: kmalloc

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

 



On Tue, Jan 16, 2007 at 19:34:22 +0530, srinivas bakki wrote:
> Are you looking for GFP_COLD ?
> 
> 
> What is that ?? i found very less documentation regarding this on the net
> but not satisfactory.
> 
> This one :
> 
> 
> "  Normally, the memory allocator tries to return "cache warm" pages—pages
> that are likely to be found in the processor cache. Instead, this flag
> requests a "cold" page, *which has not been used in some time.* It is useful
> for allocating pages for DMA reads, where presence in the processor cache is
> not useful. See Chapter
> 15<http://linuxdriver.co.il/ldd3/linuxdrive3-CHP-15.html#linuxdrive3-CHP-15>for
> a full discussion of how to allocate DMA buffers. "
> 
> what does it mean by "which has not been used in some time" ?

It does not take it from the end of free list (where the most recently freed
blocks are), but from elsewhere where the blocks that were not allocated for
longer time are.

Note, that there is no way to actually tell whether a page is cached (and
besides whether it's cached can change anytime). The pages recently used are
more *likely* to be cached. And the only estimate of when it's last been used
the allocator has is when it's been freed.

-- 
						 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