linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
Cc: Bill Irwin <wli@holomorphy.com>, linux-mm@kvack.org
Subject: Re: alloc_pages_bulk
Date: Mon, 22 Jul 2002 13:58:06 -0700	[thread overview]
Message-ID: <3D3C71DE.E88B7804@zip.com.au> (raw)
In-Reply-To: <1624320000.1027370142@flay>

"Martin J. Bligh" wrote:
> 
> >>                 min += z->pages_min;
> >>                 if (z->free_pages > min) {
> >> -                       page = rmqueue(z, order);
> >> +                       page = rmqueue(z, order, count, pages);
> >
> > This won't compile because your rmqueue() no longer returns a
> > page pointer.
> 
> Arse. Will fix that in a second.

No rush.  Need to write some code which uses the interface
first...

> > d) Look at pages_min versus count before allocating any pages.  If
> >    the allocation of `count' pagess would cause ->free_pages to fall
> >    below min, then go run some reclaim _first_, and then go grab a
> >    number of pages.  That number is min(count, nr_pages_we_just_reclaimed).
> >    So the caller may see a partial result.
> >
> > I think d), yes?
> 
> I was under the impression I was already doing that by this bit at the
> start of the loop:
> 
> -       min = 1UL << order;
> +       min = count << order;
> 
> Is that sufficient already (obviously my returns from rmqueue are total crap,
> but other than that ... ;-))

Ah.  That'll work.

-
--
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/

      reply	other threads:[~2002-07-22 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-22 18:40 alloc_pages_bulk Martin J. Bligh
2002-07-22 18:56 ` alloc_pages_bulk Benjamin LaHaise
2002-07-22 20:05   ` alloc_pages_bulk Martin J. Bligh
2002-07-22 20:26 ` alloc_pages_bulk Andrew Morton
2002-07-22 20:35   ` alloc_pages_bulk Martin J. Bligh
2002-07-22 20:58     ` 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=3D3C71DE.E88B7804@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=wli@holomorphy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox