Doesn't all the buffer pages have non-null page->private value??

From: Min Lee (abraxsus_at_yonsei.ac.kr.NOSPAM)
Date: 10/26/04

  • Next message: Pete Zaitcev (OTID1): "Re: Mapping network device names to their kernel modules?"
    Date: Tue, 26 Oct 2004 09:53:17 +0900
    
    

    Hi, folks.
    I'm working on buffer cache in Linux 2.6.7
    I modified my kernel source to trace all the buffers used for my disk.
    I expected all the contents read from the disk to remain in the form
    of buffer, which I mean the corresponding page structures have
    private flag set and private field pointing to circular buffer-heads.
    (i.e. PagePrivate(page) holds and page->private is the pointer to
    its first buffer-head.)
    But I found many physical pages allocated by
    the function __do_page_cache_readahead is used as buffers
    even though those pages doesn't hold PagePrivate(page) and has null value
    for page->private.
    ( PagePrivate(page) doesn't hold and page->private == NULL )

    What is happening here and What am I missing?
    Is my assumption that all the pages used for buffers
    has proper page->private pointer and PagePrivate(page) wrong?
    Please enlighten me.

    Thank you in advance.


  • Next message: Pete Zaitcev (OTID1): "Re: Mapping network device names to their kernel modules?"

    Relevant Pages

    • [PATCH 2/2] ext3: add data=guarded mode
      ... a workqueue where the real work of updating the on disk i_size is done. ... end_io handler for buffers that are marked as guarded. ... When we start tracking guarded buffers on a given inode, ... and it also takes a reference on the buffer head. ...
      (Linux-Kernel)
    • Re: not writing to file
      ... not what you wanted to do - it will write out as many chars as a char ... pointer is long on your system, ... long as there's enough place left in the buffers) in order to speed ... To make sure things have got written to the disk either ...
      (comp.lang.c)
    • Re: [RFC] fsblock
      ... The other reasons are that supporting larger logical block sizes than PAGE_CACHE_SIZE becomes a pain if it is not done this way when the write targets a hole as that requires all pages in the hole to be locked simultaneously which would mean dropping the page lock to acquire the others that are of lower page index and to then re-take the page lock which is horrible - much better to lock all at once from the outset and the other reason is that in NTFS there is such a thing as the initialized size of an attribute which basically states "anything past this byte offset must be returned as 0 on read, i.e. it does not have to be read from disk at all, and on write beyond the initialized_size you have to zero on disk everything between the old initialized size and the start of the write before you begin writing and certainly before you update the initalized_size otherwise a concurrent read would see random old data from the disk. ... commit_write the copied pages by dirtying their buffers ...
      (Linux-Kernel)
    • kernel 2.6.13 buffer strangeness
      ... It it's a Feature, then I'll find some way to work around it, but it seems to me that it's a Bug :-) ... effectively no more RAM to allocate for buffers. ... It's as if the kernel isn't bothering to write out any of my data until it runs out of RAM. ... Now, I'm pretty sure that the data is streaming out to the disk, cause I can see the disk activity light solidly lit on ...
      (Linux-Kernel)
    • Re: New benchmarks (was Re: SortMerge avoids thrashing (was: Baileys "two pass" FFT algorithm questi
      ... fast cache, it sounds like you can do the following: ... second disk drive, so each disk drive is running sequentially, no ... While Mike is juggling his tiny buffers, ... sys 0m0.020s ...
      (comp.programming)