linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux-foundation.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	David Howells <dhowells@redhat.com>,
	"riel@redhat.com" <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"tytso@mit.edu" <tytso@mit.edu>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"elladan@eskimo.com" <elladan@eskimo.com>,
	"npiggin@suse.de" <npiggin@suse.de>,
	"Barnes, Jesse" <jesse.barnes@intel.com>
Subject: Re: [PATCH] Show kernel stack usage to /proc/meminfo and OOM log
Date: Tue, 30 Jun 2009 10:13:34 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0906301011210.6124@gentwo.org> (raw)
In-Reply-To: <20090630150035.A738.A69D9226@jp.fujitsu.com>

On Tue, 30 Jun 2009, KOSAKI Motohiro wrote:

> +static void account_kernel_stack(struct thread_info *ti, int on)

static inline?

> +{
> +	struct zone* zone = page_zone(virt_to_page(ti));
> +	int sign = on ? 1 : -1;
> +	long acct = sign * (THREAD_SIZE / PAGE_SIZE);

int pages = THREAD_SIZE / PAGE_SIZE;

?

> +
> +	mod_zone_page_state(zone, NR_KERNEL_STACK, acct);

mod_zone_page_state(zone, NR_KERNEL_STACK, on ? pages : -pages);


--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2009-06-30 14:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30  6:03 KOSAKI Motohiro
2009-06-30  6:29 ` KOSAKI Motohiro
2009-06-30 14:13 ` Christoph Lameter [this message]
2009-06-30 23:26   ` KOSAKI Motohiro
2009-07-01  1:37     ` [PATCH v2] " KOSAKI Motohiro
2009-07-01  2:11       ` David Rientjes
2009-07-01  2:52         ` KOSAKI Motohiro
2009-07-01 14:44     ` David Howells
2009-07-01 17:16       ` Christoph Lameter
2009-07-01 17:23         ` Rik van Riel
2009-07-03  0:03           ` KOSAKI Motohiro

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=alpine.DEB.1.10.0906301011210.6124@gentwo.org \
    --to=cl@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=elladan@eskimo.com \
    --cc=hannes@cmpxchg.org \
    --cc=jesse.barnes@intel.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=tytso@mit.edu \
    /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