29 Apr, 2008

1 commit

  • - internal.h shouldn't duplicate the extern declaration for
    ramfs_file_operations already in include/linux/ramfs.h
    - file-mmu.c needs two #include's for seeing the extern declarations
    of it's global struct's

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

13 Feb, 2007

1 commit

  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

29 Jun, 2006

1 commit


29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

07 Jan, 2006

1 commit

  • The attached patch makes ramfs support shared-writable mmaps by:

    (1) Attempting to perform a contiguous block allocation to the requested size
    when truncate attempts to increase the file from zero size, such as
    happens when:

    fd = shm_open("/file/on/ramfs", ...):
    ftruncate(fd, size_requested);
    addr = mmap(NULL, subsize, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED,
    fd, offset);

    (2) Permitting any shared-writable mapping over any contiguous set of extant
    pages. get_unmapped_area() will return the address into the actual ramfs
    pages. The mapping may start anywhere and be of any size, but may not go
    over the end of file. Multiple mappings may overlap in any way.

    (3) Not permitting a file to be shrunk if it would truncate any shared
    mappings (private mappings are copied).

    Thus this patch provides support for POSIX shared memory on NOMMU kernels,
    with certain limitations such as there being a large enough block of pages
    available to support the allocation and it only working on directly mappable
    filesystems.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells