Messages in this thread | | | Date | Fri, 16 Aug 2013 11:02:57 -0700 | From | Dave Hansen <> | Subject | Re: [PATCH 5/8] mm: make clear_huge_page cache clear only around the fault address |
| |
On 08/16/2013 07:34 AM, Alex Thorlton wrote: > +#if ARCH_HAS_USER_NOCACHE == 0 > +#define clear_user_highpage_nocache clear_user_highpage > +#endif ... > cond_resched(); > - clear_user_highpage(p, addr + i * PAGE_SIZE); > + vaddr = haddr + i*PAGE_SIZE; > + if (!ARCH_HAS_USER_NOCACHE || i == target) > + clear_user_highpage(p, vaddr); > + else > + clear_user_highpage_nocache(p, vaddr); > } > }
Is the check for !ARCH_HAS_USER_NOCACHE in there really necessary? That logic seems like it would be taken care of by that #define.
Plus, if you don't check 'ARCH_HAS_USER_NOCACHE' like this, you don't need to define a value for it, and you can axe the:
+#ifndef ARCH_HAS_USER_NOCACHE +#define ARCH_HAS_USER_NOCACHE 0 +#endif
| |