mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <clameter@sgi.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Hugh Dickins <hugh@veritas.com>,
	linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vmallocinfo: Add NUMA informations
Date: Mon, 02 Jun 2008 16:09:18 +0900	[thread overview]
Message-ID: <20080602160548.B6D4.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <48439916.2070108@cosmosbay.com>

Hi

> Christoph recently added /proc/vmallocinfo file to get information about 
> vmalloc allocations.
> 
> This patch adds NUMA specific information, giving number of pages 
> allocated on each memory node.
> 
> This should help to check that vmalloc() is able to respect NUMA policies.

good patch :)


> +static void show_numa_infos(struct seq_file *m, struct vm_struct *v)
> +{
> +	if (NUMA_BUILD) {
> +		unsigned int *counters, nr;
> +
> +		counters = kzalloc(MAX_NUMNODES * sizeof(unsigned int),
> +				   GFP_KERNEL);
> +		if (!counters)
> +			return;
> +
> +		for (nr = 0; nr < v->nr_pages; nr++)
> +			counters[page_to_nid(v->pages[nr])]++;
> +
> +		for (nr = 0; nr < MAX_NUMNODES; nr++)
> +			if (counters[nr])
> +				seq_printf(m, " N%u=%u", nr, counters[nr]);
> +

for_each_node_state(n, N_HIGH_MEMORY) is better?
because MAX_NUMNODES has offten very large value.





  reply	other threads:[~2008-06-02  7:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02  6:54 Eric Dumazet
2008-06-02  7:09 ` KOSAKI Motohiro [this message]
2008-06-03  3:37   ` Eric Dumazet
2008-06-03  4:35     ` KOSAKI Motohiro
2008-06-09 14:14       ` Christoph Lameter
2008-06-03 21:40     ` Andrew Morton
2008-06-04 15:01       ` Eric Dumazet
2008-06-04 15:33         ` Randy Dunlap
2008-06-09 14:19         ` Christoph Lameter
2008-06-09 14:16       ` Christoph Lameter
2008-06-09 21:05         ` Andrew Morton
2008-06-09 21:12           ` Pekka Enberg

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=20080602160548.B6D4.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=dada1@cosmosbay.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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

all inboxes | Powered by JetHome®