lkml.org 
[lkml]   [2008]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3 of 5] x86/pgtable.h: demacro ptep_set_access_flags

* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> +static inline int ptep_set_access_flags(struct vm_area_struct *vma,
> + unsigned long address, pte_t *ptep,
> + pte_t entry, int dirty)
> +{
> + int changed = !pte_same(*ptep, entry);
> + if (changed && dirty) {
> + *ptep = entry;
> + pte_update_defer(vma->vm_mm, address, ptep);
> + flush_tlb_page(vma, address);
> + }
> + return changed;
> +}

another thing: these inlines are a bit fat and they are used in more
than one place. Please move them into pgtable.c. The rule of thumb is:
if an inline is more than 2 lines big, it is a likely candidate for
uninlining. (and even many 2-liners, and even some 1-liners are
candidates) Especially under paravirt the MMU inlines grow these update
notifiers so they become even fatter.

having functions instead of inlines also simplifies the type
dependencies by quite a degree.

Ingo


\
 
 \ /
  Last update: 2008-02-02 10:35    [W:0.223 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site