public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@osdl.org>
Cc: y-goto@jp.fujitsu.com, kamezawa.hiroyu@jp.fujitsu.com,
	mbligh@google.com, linux-kernel@vger.kernel.org,
	76306.1226@compuserve.com
Subject: Re: sparsemem panic in 2.6.17-rc5-mm1 and -mm2
Date: Wed, 07 Jun 2006 18:22:55 +0100	[thread overview]
Message-ID: <44870B6F.4030103@shadowen.org> (raw)
In-Reply-To: <20060607092950.653db4cb.akpm@osdl.org>

Andrew Morton wrote:
> On Wed, 07 Jun 2006 10:26:03 +0100
> Andy Whitcroft <apw@shadowen.org> 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.

Piece of junk compiler ...   Ok.  I'll put together the minimum check
without the shift and test that.  See if its visible in the performance.

-apw

  parent reply	other threads:[~2006-06-07 17:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-06  0:51 sparsemem panic in 2.6.17-rc5-mm1 and -mm2 Martin Bligh
2006-06-06  3:07 ` Andrew Morton
2006-06-06  5:19   ` KAMEZAWA Hiroyuki
2006-06-06  5:36     ` Yasunori Goto
2006-06-06  7:27       ` Andrew Morton
2006-06-07  0:43         ` KAMEZAWA Hiroyuki
2006-06-07  4:58           ` Andrew Morton
2006-06-07  5:36             ` Rusty Russell
2006-06-07  5:50               ` Andrew Morton
2006-06-07  6:49                 ` Rusty Russell
2006-06-07  9:26         ` Andy Whitcroft
2006-06-07 16:29           ` Andrew Morton
2006-06-07 16:35             ` Andrew Morton
2006-06-07 17:50               ` Andy Whitcroft
2006-06-15 12:28               ` [PATCH] zone handle unaligned zone boundaries Andy Whitcroft
2006-06-07 17:22             ` Andy Whitcroft [this message]
2006-06-06 23:42 ` sparsemem panic in 2.6.17-rc5-mm1 and -mm2 Andrew Morton
2006-06-07  9:16   ` Mel Gorman
2006-06-07 17:38   ` Andy Whitcroft
2006-06-07 17:41 ` Andy Whitcroft
  -- strict thread matches above, loose matches on Subject: below --
2006-06-06  3:50 Chuck Ebbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44870B6F.4030103@shadowen.org \
    --to=apw@shadowen.org \
    --cc=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=y-goto@jp.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox