[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/mm: Make asserts on types and counts of shared pages more accurate



At 06:50 -0800 on 09 Feb (1328770222), Andres Lagar-Cavilla wrote:
> > At 01:01 -0500 on 09 Feb (1328749297), Andres Lagar-Cavilla wrote:
> >>  xen/arch/x86/mm/mem_sharing.c |  4 +++-
> >>  xen/arch/x86/mm/p2m.c         |  6 ++++--
> >>  2 files changed, 7 insertions(+), 3 deletions(-)
> >>
> >>
> >> Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
> >
> > NACK, I'm afraid, especially the second one.  '<=' comparisons with a
> > number that's made up of a count ORed with a type don't make sense.
> > If you want to test both type and count, just test them separately.
> 
> The type I'm ORing with is a mask with single bit set, not a multi-bit
> type mask. And the type is defined as a higher order bit than the count
> mask.

It is right now, but if someone reshuffles the page_info struct again
you don't want it to banjax your super-cunning code.  Just test the
thing you need to test. :)

Tim.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.