The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Marcus Alanen <marcus@infa.abo.fi>,
	maalanen@ra.abo.fi, linux-kernel@vger.kernel.org
Subject: Re: [patch, 2.5] __vmalloc allocates spurious page?
Date: Tue, 15 Oct 2002 15:21:18 -0700	[thread overview]
Message-ID: <3DAC94DE.BB6F4B4E@digeo.com> (raw)
In-Reply-To: 20021015230506.D7702@flint.arm.linux.org.uk

Russell King wrote:
> 
> On Wed, Oct 16, 2002 at 12:58:12AM +0300, Marcus Alanen wrote:
> > >The unnecessary page is allocated only if size is initially a multiple
> > >of PAGE_SIZE, which sounds like a common case.
> >
> > Actually, size is already PAGE_ALIGNed, so we get the amount of pages
> > even easier.
> 
> IIRC, back in the dim and distant past, the extra page was originally to
> catch things running off the end of their space (eg, modules).  The
> idea was that modules (and other vmalloc'd areas) would be separated
> by one unmapped page.
> 
> It looks like this got broken recently though.

Still there I think.

struct vm_struct *get_vm_area(unsigned long size, unsigned long flags)
{
	...

        /*
         * We always allocate a guard page.
         */
        size += PAGE_SIZE;


Marcus's patch looks reasonable.

      parent reply	other threads:[~2002-10-15 22:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 19:32 [patch, 2.5] __vmalloc allocates spurious page? Marcus Alanen
2002-10-15 21:58 ` Marcus Alanen
2002-10-15 22:05   ` Russell King
2002-10-15 22:11     ` William Lee Irwin III
2002-10-15 22:21     ` Andrew Morton [this message]

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=3DAC94DE.BB6F4B4E@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maalanen@ra.abo.fi \
    --cc=marcus@infa.abo.fi \
    --cc=rmk@arm.linux.org.uk \
    /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