Re: [PATCH] [1/9] Handle kernel near memory hole in clear_kernel_mapping

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Thomas Gleixner <tglx@...>
Cc: Andi Kleen <ak@...>, <ebiederm@...>, <vgoyal@...>, <mingo@...>, <linux-kernel@...>
Date: Thursday, January 31, 2008 - 12:22 pm

> > +#define overlaps(as, ae, bs, be) ((ae) >= (bs) && (as) <= (be))

Which one do you prefer? (to be honest the current one is "intuitive"
to me) 



It is -- there are BUG_ONs for this in __clear_kernel_mapping


It is enforced in the callers (actually there is only a single caller -- 
the GART code ) by not calling it overlapping for the kernel itself.
Given that could be checked too, but that would be probably overkill
for an internal function.


Ok.


Hmm I can add one, but if that happens the caller is likely seriously
confused and will likely cause other problems anyways. 

I don't think it can happen for the GART code which is currently
the only caller.


Hmm true -- that will only affect relocatable kernels, but for those
it's wrong. Given that the patch was supposed to fix a case 
that only happens relocatable kernels that's quite ironic :)

Actually thinking about it again you can just drop it for now.
It is orthogonal to gbpages. I think I added it to the series
when I was planning to do kernel mapping as GB pages, but that
turned out to be a bad idea anyways.

Thanks for the review,

-Andi
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [0/9] Latest GBPAGES patchkit for 2.6.25, Andi Kleen, (Tue Jan 29, 1:06 am)
Re: [PATCH] [1/9] Handle kernel near memory hole in clear_ke..., Andi Kleen, (Thu Jan 31, 12:22 pm)