Re: [RFC] sys_punchhole()

From: Rob Landley (rob_at_landley.net)
Date: 11/21/05

  • Next message: Rob Landley: "[PATCH] make miniconfig"
    To: Badari Pulavarty <pbadari@us.ibm.com>
    Date:	Mon, 21 Nov 2005 00:46:44 -0600
    
    

    On Wednesday 16 November 2005 16:01, Badari Pulavarty wrote:
    > Hmm. Someone other than me asking for it ?
    >
    > I did the madvise() hack and asking to see if any one really needs
    > sys_punchole().

    I run into a potential use case for every once in a while. For example, there
    was recent discussion on the User Mode Linux list about this, since the
    "physical memory" that uses is an mmaped file so the logical way to give
    unused memory back to the host OS (initially via a hotplug memory interface
    driven by some kind of daemon, since the pagecache expands to fill all
    available space even when the data is also redundantly cached by the host OS)
    would by via sys_punchole().

    Of course UML's physmem file is normally on a tmpfs() mount, where
    madvise(DONTNEED) has special behavior to work like punch anyway. So it
    looks like special cases to work around this lack can be added ad infinitum
    so there's never any immediate need for the actual generic functionality.

    On the other hand, if you're going to support holes at all, having to recreate
    the file to get your hole back is kind of silly. I personally think the
    ability to create holes in a new file but not create holes in an existing
    file is every bit as strange as being able to extend a file but not truncate
    it. (See the java 1.1 api for an example of _that_ particular thinko...)

    Rob
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Rob Landley: "[PATCH] make miniconfig"

    Relevant Pages

    • Re: JCL
      ... The refrigerator sized cabinet not only housed this core memory, ... Speaking of paper tape, anyone ever have to bootstrap a machine by entering ... Another new fangled invention by IBM: 96 column cards! ... Not the standard rectangular 80 column ones with rectangular holes ...
      (comp.sys.hp.mpe)
    • Re: [PATCH 2/2] cciss: disable dma prefetch for P600
      ... falling off into one the holes on IPF and AMD. ... It doesn't happen on Proliant because the last 4kB of memory is ... prefetching was walking off the end of real mmeory and into the AGP region ... There is a bug in the DMA engine that that may result in prefetching ...
      (Linux-Kernel)
    • Re: removing Unfilled ROM holes
      ... but the memory hole is 8K!?! ... but that can often leave holes in the memory ... At best you can combine Dlls together and link code statically ... > smaillet at EmbeddedFusion dot com ...
      (microsoft.public.windowsce.platbuilder)
    • Re: hash table sizes
      ... >> NUMA with memory holes between nodes at the moment, ... > holes just below 4GB regardless. ... do - were you seeing this on x440 or NUMA-Q? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Kernel Dump
      ... > IA64 and Sparc systems usually had sparse memory configurations and the ... I reused most of the ia64 code. ... > The problem is that x86 machines are increasinly having memory holes. ...
      (freebsd-arch)