lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 2/2] Simple shared page tables
    On Tue, Aug 15, 2006 at 05:56:18PM -0500, Dave McCracken wrote:

    > The actual shared page table patches

    Some stylistic nits I ran into while reading these:

    > +#else /* CONFIG_PTSHARE */
    > +#define pt_is_shared(page) (0)
    > +#define pt_is_shared_pte(pmdval) (0)
    > +#define pt_increment_share(page)
    > +#define pt_decrement_share(page)
    > +#define pt_share_pte(vma, pmd, address) pte_alloc_map(vma->vm_mm, pmd, address)
    > +#define pt_unshare_range(mm, address, end)
    > +#define pt_check_unshare_pte(mm, address, pmd) (0)
    > +#endif /* CONFIG_PTSHARE */

    ISTR empty statements gave warnings with some compilers, perhaps use
    do {} while (0) here?

    > @@ -144,8 +147,9 @@ mprotect_fixup(struct vm_area_struct *vm
    > if (newflags & VM_WRITE) {
    > if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED))) {
    > charged = nrpages;
    > - if (security_vm_enough_memory(charged))
    > + if (security_vm_enough_memory(charged)) {
    > return -ENOMEM;
    > + }

    Superflous {}

    > newflags |= VM_ACCOUNT;
    > }
    > }
    > @@ -182,7 +186,7 @@ success:
    > if (vma->vm_ops && vma->vm_ops->page_mkwrite)
    > mask &= ~VM_SHARED;
    >
    > - newprot = protection_map[newflags & mask];
    > + newprot = protection_map[newflags & mask];

    Whitespace damaged

    Cheers,
    Muli
    -
    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/

    \
     
     \ /
      Last update: 2006-08-16 12:57    [W:0.024 / U:33.288 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site