From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: linux-mips@linux-mips.org
Subject: Re: [patch] 2.4, head: PAGE_SHIFT changes break glibc
Date: Fri, 21 Nov 2003 19:50:35 +0100 [thread overview]
Message-ID: <20031121185035.GC8318@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.55.0311211550270.32551@jurand.ds.pg.gda.pl>
On Fri, Nov 21, 2003 at 06:33:37PM +0100, Maciej W. Rozycki wrote:
> Recent changes made to <asm/page.h> break a build of glibc 2.2.5 for me.
> Compilation bails out due to PAGE_SHIFT being undeclared -- glibc pulls it
> as it uses PAGE_SIZE in linuxthreads/internals.h. The PAGE_SHIFT macro
> depends on configuration now (I use an empty cofinguration for glibc
> headers, hence the error) and thus it'd better be simply private to the
> kernel. Glibc will then use sysconf(_SC_PAGE_SIZE) which now better
> reflects actual configuration of the system it's run on.
Interesting. IA-64 does the same thing, for example. Wonder why they
seem to be able to get away with that. At the very least including the
kernel header file may pick up a wrong value for PAGE_SHIFT.
> Here's a patch that limits PAGE_SIZE to the kernel scope. If there's any
> other program that needs PAGE_SIZE, it should be converted to
> sysconf(_SC_PAGE_SIZE) as well.
>
> OK to apply?
Yes, please go ahead.
> Additionally, I think we should also implement the getpagesize syscall to
> benefit statically linked programs (and make glibc use it like for other
> platforms that use variable page sizes).
The kernel is already passing AT_PAGESZ to ELF binaries. Wouldn't that
be sufficient? Currently it's passing the largest supported page size,
that is 64k. However this constant is always passed even when a smaller
page size is configured.
> Finally, I'm not sure such a
> noticeable change was a good move in these late days of 2.4...
TLB reloads have been shown to be a major performance problem; this is an
not yet completed attempt to improve the situation so people don't need
to go for crude hacks such as wired TLB entires and similar.
Other parts of improvments such as hugetlbfs are available in 2.6 only
anyway. I'm also thinking of changing the pagetable structure back to
the aggressivly optmized thing we were using before Linux 2.0.14 - but
certainly not for 2.4 - too intrusive, as you say. With most MIPS users
being embedded users I still expect 2.4 to live for quite a while -
certainly longer than I'd like to see ...
Ralf
next prev parent reply other threads:[~2003-11-21 18:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-21 17:33 [patch] 2.4, head: PAGE_SHIFT changes break glibc Maciej W. Rozycki
2003-11-21 18:50 ` Ralf Baechle [this message]
2003-11-21 20:07 ` Maciej W. Rozycki
2003-11-25 15:27 ` Maciej W. Rozycki
2003-11-25 23:24 ` Ralf Baechle
2003-11-26 0:09 ` Maciej W. Rozycki
2003-11-26 17:02 ` Daniel Jacobowitz
2003-11-27 12:45 ` Maciej W. Rozycki
2003-11-27 17:37 ` Daniel Jacobowitz
2003-11-27 19:31 ` Maciej W. Rozycki
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=20031121185035.GC8318@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@ds2.pg.gda.pl \
/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