mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ken Chen" <kenchen@google.com>
To: "Paul Jackson" <pj@sgi.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	mm-commits@vger.kernel.org, agl@us.ibm.com,
	hermes@gibson.dropbear.id.au, wli@holomorphy.com,
	clameter@sgi.com
Subject: Re: + per-cpuset-hugetlb-accounting-and-administration.patch added to -mm tree
Date: Thu, 3 May 2007 21:49:12 -0700	[thread overview]
Message-ID: <b040c32a0705032149t2a380f82t8145c1d0f8f6736@mail.gmail.com> (raw)
In-Reply-To: <20070503183821.b75e8f57.pj@sgi.com>

On 5/3/07, Paul Jackson <pj@sgi.com> wrote:
> Adding Christoph Lameter <clameter@sgi.com> to the cc list, as he knows
> more about hugetlb pages than I do.
>
> This patch strikes me as a bit odd.
>
> Granted, it's solving what could be a touchy problem with a fairly
> simple solution, which is usually a Good Thing(tm).
>
> However, the idea that different tasks would see different values for
> the following fields in /proc/meminfo:
>
>         HugePages_Total:     0
>         HugePages_Free:      0
>
> strikes me as odd, and risky.  I would have thought that usually, all
> tasks in the system should see the same values in the files in /proc
> (as opposed to the files in particular task subdirectories /proc/<pid>.)
>
> This patch strikes me as a bit of a hack, good for compatibility, but
> hiding a booby trap that will bite some user code in the long run.
>
> But I'm not enough of an expert to know what the right tradeoffs are
> in this matter.

Would annotating the Hugepages_* field with name of cpuset help?  I
orginally thought that since cpuset's mems are hirearchical in memory
assignment, it is fairly straightforward to understand what's going
on: parent cpuset stats include its and all of its children.  For
example, if root cpuset has two sub job1 and job2 cpusets, each has 20
and 30 htlb pages, when query at each level, we have:

[root@box]# echo $$ > /dev/cpuset/tasks
[root@box]# grep HugePages_Total /proc/meminfo
HugePages_Total:    50

[root@box]# echo $$ > /dev/cpuset/job1/tasks
[root@box]# grep HugePages_Total /proc/meminfo
HugePages_Total:    20

[root@box]# echo $$ > /dev/cpuset/job2/tasks
[root@box]# grep HugePages_Total /proc/meminfo
HugePages_Total:    30

If this is odd, do you have any suggestions for alternative?

- Ken

  reply	other threads:[~2007-05-04  4:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200705040104.l4414YFR026322@shell0.pdx.osdl.net>
2007-05-04  1:38 ` Paul Jackson
2007-05-04  4:49   ` Ken Chen [this message]
2007-05-04  5:03     ` Andrew Morton
2007-05-04  5:58       ` Paul Jackson
2007-05-04  6:13         ` Ken Chen
2007-05-04  7:39           ` Paul Jackson
2007-05-04  5:12     ` Paul Jackson
2007-05-04  5:35       ` David Rientjes
2007-05-04  6:12         ` Paul Jackson
2007-05-04  6:45   ` Bill Irwin

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=b040c32a0705032149t2a380f82t8145c1d0f8f6736@mail.gmail.com \
    --to=kenchen@google.com \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=hermes@gibson.dropbear.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=pj@sgi.com \
    --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

all inboxes | Powered by JetHome®