linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran.net>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-mm@kvack.org
Subject: Re: [RFC] VM statistics to gather
Date: Tue, 26 Jun 2001 03:11:03 +0200	[thread overview]
Message-ID: <200106260114.f5Q1EVg27737@mailg.telia.com> (raw)
In-Reply-To: <Pine.LNX.4.33L.0106252048230.23373-100000@duckman.distro.conectiva>

On Tuesday 26 June 2001 01:59, Rik van Riel wrote:
> On Tue, 26 Jun 2001, Roger Larsson wrote:
> > What about
> >
> >    unsigned int vm_pgfails /* failed alloc attempts, in pages (not calls)
> > */
>
> What would that represent ?
>
> How often __alloc_pages() exits without allocating anything?

Yes, failed allocs  [Call it vm_pgalloc_fails ?]

>
> > maybe even a
> >
> >    unsigned int vm_pgallocs /* alloc attempts, in pages */
> >
> > for sanity checking - should be the sum of several other combinations...
>
> Sounds like a nice idea.
>

Let this and vm_pgalloc_fails work together,

at __alloc_pages entry (always done) account in vm_pgallocs
at failed exit account in vm_pgallocs_failed

> > Should memory zone be used as dimension?
>
> Useful for allocations I guess, but it may be too confusing
> if we do this for all statistics... OTOH...

Using order as another dimension could also be interesting...
Something like this?

vm_pgallocs[
	order < MAX_ACCOUNT_ORDER ? order : MAX_ACCOUNT_ORDER][
	gfp_mask & GFP_ZONEMASK] += (1 << order)

Or even simpler (assuming MAX_ACCOUNT_ORDER == 1)

vm_pgallocs[!!order][gfp_mask & GFP_ZONEMASK] += (1 << order)

BTW, why is GFP_ZONEMASK 0xf when MAX_NR_ZONES is 3 ? (i.e. 0..2)

/RogerL

-- 
Roger Larsson
Skelleftea
Sweden
--
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:[~2001-06-26  1:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-25 23:04 Rik van Riel
2001-06-25 23:35 ` Roger Larsson
2001-06-25 23:59   ` Rik van Riel
2001-06-26  1:11     ` Roger Larsson [this message]
2001-06-26  7:42     ` Stephen C. Tweedie
2001-06-26  1:45 ` Marcelo Tosatti
2001-06-26  7:13   ` Marcelo Tosatti
2001-06-26  4:24 ` Andrew Morton
2001-06-26  5:07   ` Marcelo Tosatti
2001-06-26  5:10     ` Marcelo Tosatti
2001-06-26  7:59     ` Andrew Morton
2001-06-27 10:30       ` Marcelo Tosatti

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=200106260114.f5Q1EVg27737@mailg.telia.com \
    --to=roger.larsson@norran.net \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    /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