linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Page alignment issue
@ 2006-12-27 15:49 Aubrey
  2006-12-28  3:49 ` Aubrey
  2006-12-31  6:02 ` Nick Piggin
  0 siblings, 2 replies; 3+ messages in thread
From: Aubrey @ 2006-12-27 15:49 UTC (permalink / raw)
  To: linux-kernel, linux-mm; +Cc: Nick Piggin

As for the buddy system, much of docs mention the physical address of
the first page frame of a block should be a multiple of the group
size. For example, the initial address of a 16-page-frame block should
be 16-page aligned. I happened to encounted an issue that the physical
addresss pf the block is not 4-page aligned(0x36c9000) while the order
of the block is 2. I want to know what out of buddy algorithm depend
on this feature? My problem seems to happen in
schedule()->context_switch() call, but so far I didn't figure out the
root cause.

Any clue or suggestion will be really appreciated!
Thanks,
-Aubrey

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Page alignment issue
  2006-12-27 15:49 Page alignment issue Aubrey
@ 2006-12-28  3:49 ` Aubrey
  2006-12-31  6:02 ` Nick Piggin
  1 sibling, 0 replies; 3+ messages in thread
From: Aubrey @ 2006-12-28  3:49 UTC (permalink / raw)
  To: linux-kernel, linux-mm; +Cc: Nick Piggin

On 12/27/06, Aubrey <aubreylee@gmail.com> wrote:
> As for the buddy system, much of docs mention the physical address of
> the first page frame of a block should be a multiple of the group
> size. For example, the initial address of a 16-page-frame block should
> be 16-page aligned. I happened to encounted an issue that the physical
> addresss pf the block is not 4-page aligned(0x36c9000) while the order
> of the block is 2. I want to know what out of buddy algorithm depend
> on this feature? My problem seems to happen in
> schedule()->context_switch() call, but so far I didn't figure out the
> root cause.

It seems nothing depend on this feature. the problem you encounted is
the kernel task stack should be 2-page aligned.

-Aubrey

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Page alignment issue
  2006-12-27 15:49 Page alignment issue Aubrey
  2006-12-28  3:49 ` Aubrey
@ 2006-12-31  6:02 ` Nick Piggin
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Piggin @ 2006-12-31  6:02 UTC (permalink / raw)
  To: Aubrey; +Cc: linux-kernel, linux-mm

Aubrey wrote:
> As for the buddy system, much of docs mention the physical address of
> the first page frame of a block should be a multiple of the group
> size. For example, the initial address of a 16-page-frame block should
> be 16-page aligned. I happened to encounted an issue that the physical
> addresss pf the block is not 4-page aligned(0x36c9000) while the order
> of the block is 2. I want to know what out of buddy algorithm depend
> on this feature?

I think that's correct. The buddy allocator uses bitwise operations to
find buddy pages and promote free pairs (eg. see __page_find_buddy()
and __find_combined_index()).

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-31  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-27 15:49 Page alignment issue Aubrey
2006-12-28  3:49 ` Aubrey
2006-12-31  6:02 ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox