From: Yuri Tikhonov <yur@emcraft.com>
To: Ilya Yanok <yanok@emcraft.com>
Cc: linuxppc-dev@ozlabs.org, prodyut hazarika <prodyuth@gmail.com>,
wd@denx.de, dzu@denx.de
Subject: Re[2]: [PATCH] powerpc: add support for PAGE_SIZEs greater than 4KB for
Date: Fri, 12 Sep 2008 03:52:38 +0400 [thread overview]
Message-ID: <929314322.20080912035238@emcraft.com> (raw)
In-Reply-To: <48C99F42.80909@emcraft.com>
=0D=0AHi Ilya,
On Friday, September 12, 2008 you wrote:
> Hi,
> prodyut hazarika wrote:
>> In file arch/powerpc/mm/pgtable_32.c, we have:
>>
>> #ifdef CONFIG_PTE_64BIT
>> /* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
>> #define PGDIR_ORDER 1
>> #else
>> #define PGDIR_ORDER 0
>> #endif
>> pgd_t *pgd_alloc(struct mm_struct *mm)
>> {
>> pgd_t *ret;
>>
>> ret =3D (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, PGDIR_O=
RDER);
>> return ret;
>> }
>>
>> Thus, we allocate 2 pages for 44x processors for PGD. This is needed
>> only for 4K page.
>> We are anyway not using the whole 64K or 256K page for the PGD. So
>> there is no point to waste an additional 64K or 256KB page
>> =20
> Ok. Not sure I'm right but I think 16K case doesn't need second page=20
> too. (PGDIR_SHIFT=3D25, so sizeof(pgd_t)<<(32-PGDIR_SHIFT) < 16KB)
ACK, no need need in a second page when working with 16K pages.
Prodyut's approach addresses this too, but ...
>> Change this to:
>> #ifdef CONFIG_PTE_64BIT
>> #if (PAGE_SHIFT =3D=3D 12)
>> =20
> I think #ifdef CONFIG_PTE_64BIT is a little bit confusing here... =20
> Actually PGDIR_ORDER should be something like max(32 + 2 - PGDIR_SHIFT
> - PAGE_SHIFT, 0)
>> /* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
>> #define PGDIR_ORDER 1
>> #else
>> #define PGDIR_ORDER 0
>> #endif
>> #else
>> #define PGDIR_ORDER 0
>> #endif
>> =20
> Yuri, any comments?
... as for me, I like your approach more.
Regards, Yuri
--
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com
next prev parent reply other threads:[~2008-09-11 23:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 21:53 [RFC PATCH] Support for big page sizes on 44x Ilya Yanok
2008-09-10 21:53 ` [PATCH] powerpc: add support for PAGE_SIZEs greater than 4KB for Ilya Yanok
2008-09-11 16:57 ` prodyut hazarika
2008-09-11 18:15 ` Re[2]: " Yuri Tikhonov
2008-09-11 20:09 ` Josh Boyer
2008-09-11 23:38 ` Ilya Yanok
2008-09-12 0:47 ` Josh Boyer
2008-09-11 18:28 ` Ilya Yanok
2008-09-11 18:38 ` prodyut hazarika
2008-09-11 22:44 ` Ilya Yanok
2008-09-11 23:52 ` Yuri Tikhonov [this message]
2008-09-11 18:53 ` prodyut hazarika
2008-09-11 21:51 ` Ilya Yanok
2008-09-13 17:49 ` Benjamin Herrenschmidt
2008-09-13 23:37 ` Josh Boyer
2008-09-11 22:37 ` prodyut hazarika
2008-09-11 23:20 ` Re[2]: " Yuri Tikhonov
2008-09-12 3:48 ` David Gibson
2008-09-13 17:46 ` Benjamin Herrenschmidt
2008-09-26 23:43 ` Ilya Yanok
2008-09-26 23:35 ` Ilya Yanok
2008-09-29 2:58 ` David Gibson
2008-09-10 21:53 ` [PATCH] mm: fix ENTRIES_PER_PAGEPAGE overflow with 256KB pages Ilya Yanok
2008-09-12 3:50 ` David Gibson
2008-09-12 5:29 ` prodyut hazarika
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=929314322.20080912035238@emcraft.com \
--to=yur@emcraft.com \
--cc=dzu@denx.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=prodyuth@gmail.com \
--cc=wd@denx.de \
--cc=yanok@emcraft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.