[lkml]   [2003]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: 2.5.67-mm3
    William Lee Irwin III <> wrote:
    >> + for (; addr < (unsigned long)uaddr + size && !ret; addr += PAGE_SIZE)
    >> + ret = __put_user(0, (char *)max(addr, (unsigned long)uaddr));

    On Mon, Apr 14, 2003 at 09:31:14PM -0700, Andrew Morton wrote:
    > This hurts my brain. If anything, it should be formulated as a do-while loop.
    > But I'm not sure we should really bother, because relatively large amounts of
    > stuff is broken for PAGE_SIZE != PAGE_CACHE_SIZE anyway. tmpfs comes to
    > mind...
    > If page clustering needs to redo this code (and I assume it does) then that
    > would be an argument in favour.

    Page clustering wants something similar but slightly different. The
    unit it wants as its stride (MMUPAGE_SIZE) isn't present so this doesn't
    really help or hurt it. I believe I actually dodged this bullet by
    ensuring (or incorrectly assuming) the callers used sizes <= MMUPAGE_SIZE
    and left it either unaltered and suboptimal or (worst-case) buggy.

    I'm just going down the list of FIXME's in the VM I turned up by grepping.
    Should we do the following instead?

    -- wli

    diff -urpN mm3-2.5.67-2/include/linux/pagemap.h mm3-2.5.67-2A/include/linux/pagemap.h
    --- mm3-2.5.67-2/include/linux/pagemap.h 2003-04-07 10:30:34.000000000 -0700
    +++ mm3-2.5.67-2A/include/linux/pagemap.h 2003-04-14 21:24:52.000000000 -0700
    @@ -169,7 +169,7 @@ extern void end_page_writeback(struct pa
    * Fault a userspace page into pagetables. Return non-zero on a fault.
    - * FIXME: this assumes that two userspace pages are always sufficient. That's
    + * This assumes that two userspace pages are always sufficient. That's
    * not true if PAGE_CACHE_SIZE > PAGE_SIZE.
    static inline int fault_in_pages_writeable(char *uaddr, int size)
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2005-03-22 13:34    [W:0.021 / U:1.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site