From: Jay Lan <jlan@engr.sgi.com>
To: Frank van Maarseveen <frankvm@frankvm.com>
Cc: Christoph Lameter <clameter@engr.sgi.com>,
Hugh Dickins <hugh@veritas.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.14-rc2] fix incorrect mm->hiwater_vm and mm->hiwater_rss
Date: Wed, 21 Sep 2005 11:38:04 -0700 [thread overview]
Message-ID: <4331A88C.4080109@engr.sgi.com> (raw)
In-Reply-To: <20050921180621.GA17272@janus>
Frank van Maarseveen wrote:
> On Wed, Sep 21, 2005 at 10:39:01AM -0700, Jay Lan wrote:
>
>>Frank's patch looks fine to me except one place:
>>diff -ru a/mm/mmap.c b/mm/mmap.c
>>--- a/mm/mmap.c 2005-09-21 11:07:40.000000000 +0200
>>+++ b/mm/mmap.c 2005-09-21 11:17:06.755572000 +0200
>>@@ -854,6 +854,7 @@
>> mm->stack_vm += pages;
>> if (flags & (VM_RESERVED|VM_IO))
>> mm->reserved_vm += pages;
>>+ update_mem_hiwater(mm);
>> }
>> #endif /* CONFIG_PROC_FS */
>>
>>I have a question of adding this call here. 'update_mem_hiwater'
>>does nothing unless mm->total_vm or rss gets updated.
>>I do not see total_vm get updates in __vm_stat_account()?
>
>
> Check the callers of __vm_stat_account(). It is called at various places
> after increasing (sometimes decreasing) vm_total.
Sounds good.
- jay
>
> BTW, __vm_stat_account() itself is surrounded by #ifdef CONFIG_PROC_FS so
> I'd thought that that might be appropriate for hiwater_* too. So far they are
> set but are not read except by my patch for /proc/pid/status. >
> in 2.6.13.2:
>
> $ find -type f|xargs grep hiwater_rss
> ./kernel/fork.c: mm->hiwater_rss = get_mm_counter(mm,rss);
> ./include/linux/sched.h: unsigned long hiwater_rss; /* High-water RSS usage */
> ./mm/memory.c: if (tsk->mm->hiwater_rss < rss)
> ./mm/memory.c: tsk->mm->hiwater_rss = rss;
> ./mm/nommu.c: if (tsk->mm->hiwater_rss < rss)
> ./mm/nommu.c: tsk->mm->hiwater_rss = rss;
>
> $ find -type f|xargs grep hiwater_vm
> ./kernel/fork.c: mm->hiwater_vm = mm->total_vm;
> ./include/linux/sched.h: unsigned long hiwater_vm; /* High-water virtual memory usage */
> ./mm/memory.c: if (tsk->mm->hiwater_vm < tsk->mm->total_vm)
> ./mm/memory.c: tsk->mm->hiwater_vm = tsk->mm->total_vm;
> ./mm/nommu.c: if (tsk->mm->hiwater_vm < tsk->mm->total_vm)
> ./mm/nommu.c: tsk->mm->hiwater_vm = tsk->mm->total_vm;
>
> The matches in mm/memory.c and mm/nommu.c are in function update_mem_hiwater().
>
next prev parent reply other threads:[~2005-09-21 18:38 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-21 12:19 [PATCH 2.6.14-rc2] fix incorrect mm->hiwater_vm and mm->hiwater_rss Frank van Maarseveen
2005-09-21 14:38 ` Hugh Dickins
2005-09-21 14:58 ` Frank van Maarseveen
2005-09-21 15:35 ` Hugh Dickins
2005-09-21 18:42 ` Frank van Maarseveen
2005-09-21 18:57 ` Hugh Dickins
2005-09-21 15:26 ` Christoph Lameter
2005-09-21 15:50 ` Frank van Maarseveen
2005-09-21 16:57 ` Jay Lan
2005-09-21 17:05 ` Christoph Lameter
2005-09-21 17:39 ` Jay Lan
2005-09-21 18:06 ` Frank van Maarseveen
2005-09-21 18:38 ` Jay Lan [this message]
2005-09-21 17:12 ` Hugh Dickins
2005-09-21 17:31 ` Jay Lan
2005-09-21 17:45 ` Christoph Lameter
2005-09-21 17:46 ` Hugh Dickins
2005-09-21 18:05 ` Jay Lan
2005-09-21 18:26 ` Frank van Maarseveen
2005-09-21 19:19 ` Hugh Dickins
2005-09-21 19:28 ` Frank van Maarseveen
2005-09-21 19:38 ` Jay Lan
2005-09-21 19:47 ` Hugh Dickins
2005-09-21 19:48 ` Frank van Maarseveen
2005-09-21 19:52 ` Hugh Dickins
2005-09-21 19:48 ` Christoph Lameter
2005-09-21 20:06 ` Hugh Dickins
2005-09-21 20:13 ` Christoph Lameter
2005-09-27 20:43 ` Jay Lan
2005-09-27 21:47 ` Jay Lan
2005-09-27 21:50 ` Christoph Lameter
2005-09-27 22:43 ` Jay Lan
2005-09-28 13:18 ` Hugh Dickins
2005-09-28 17:31 ` Jay Lan
2005-10-03 19:53 ` Hugh Dickins
2005-10-04 8:59 ` Frank van Maarseveen
2005-10-04 21:48 ` Jay Lan
2005-10-07 2:09 ` Jay Lan
2005-10-07 3:03 ` Hugh Dickins
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=4331A88C.4080109@engr.sgi.com \
--to=jlan@engr.sgi.com \
--cc=clameter@engr.sgi.com \
--cc=frankvm@frankvm.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.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.