All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, andi@firstfloor.org,
	randy.dunlap@oracle.com, corbet@lwn.net,
	torvalds@linux-foundation.org
Subject: Re: [PATCH] Add alloc_pages_exact() and free_pages_exact()
Date: Tue, 24 Jun 2008 16:44:14 -0500	[thread overview]
Message-ID: <48616AAE.703@freescale.com> (raw)
In-Reply-To: <1214343218.12367.58.camel@nimitz>

Dave Hansen wrote:

> This looks like a really good idea.  It looks pretty good to me, no
> functional problems.  

Thanks.

> I think the thing that confused me was trying to figure out if
> 'alloc_end' was the end of what we *did* allocate from
> __get_free_pages() or if it was the *goal* allocation end.
> 
> 'used' also seemed like a slightly strange variable name because it
> points to the memory which is about to be freed and ends up *unused*.

This function is taken almost verbatim from alloc_large_system_hash().  I
figured if the terminology was good for that function, it's good for mine.

> I'll offer this up just in case you like it better.  For me, it is
> easier to parse, and should do the exact same thing.  I also think it's
> slightly nicer to do the arithmetic on 'struct page *' rather than
> vaddrs in 'unsigned long'.  It is _slightly_ cheaper not having to do a
> virt_to_page() on each free_page() call.  The same would go for the free
> side as well.

It does seem to be an improvement, although AKPM just accepted this patch.  I'd
hate to bother him with a replacement patch for something so minor.

-- 
Timur Tabi
Linux kernel developer at Freescale

      reply	other threads:[~2008-06-24 22:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 16:40 [PATCH] Add alloc_pages_exact() and free_pages_exact() Timur Tabi
2008-06-24 21:33 ` Dave Hansen
2008-06-24 21:44   ` Timur Tabi [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=48616AAE.703@freescale.com \
    --to=timur@freescale.com \
    --cc=andi@firstfloor.org \
    --cc=corbet@lwn.net \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=torvalds@linux-foundation.org \
    /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.