Re: sparsemem panic in 2.6.17-rc5-mm1 and -mm2

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

 



On Wed, 07 Jun 2006 10:26:03 +0100
Andy Whitcroft <[email protected]> wrote:

> > btw Andy, that UNALIGNED_ZONE_BOUNDARIES message is useless.  Only 0.1% of
> > users even have the knowledge how to recompile their kernel, let alone the
> > inclination.  Can we do something smarter here?
> 
> Yes, valid point there.  The overall plan is that this should never come
> out as the option should be on unless the architecture is ensuring
> alignment.  Right now the only architecture which is so marked is x86.
> I wonder if we should also be tainting the kernel at that point so its
> obvious to 'us' that a kernel has this problem?

Better to make things just work if we can.

> The other option is to just turn the check on all the time.  It is two
> shift and mask + a compare on two cache lines that we definatly are
> examining anyhow to make the merge checks.

Sounds OK to me.

Note that the code can be optimised:

	if (page_zone_id(page) != page_zone_id(buddy))

...

static inline int page_zone_id(struct page *page)
{
	return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK;
}

We don't need to perform the shift to make that comparison.  If the
compiler's sufficiently smart it will be able to optimise that for us.

<checks>

        shrl    $30, %edx       #, <variable>.flags
        shrl    $30, %eax       #, <variable>.flags
        cmpl    %eax, %edx      # <variable>.flags, <variable>.flags

Nope, not smart enough.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux