From: Arun Sharma <arun.sharma@google.com>
To: Andrew Morton <akpm@osdl.org>
Cc: rohit.seth@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Expose SHM_HUGETLB in shmctl(id, IPC_STAT, ...)
Date: Thu, 10 Nov 2005 18:49:56 -0800 [thread overview]
Message-ID: <437406D4.4060304@google.com> (raw)
In-Reply-To: <20051110140621.47729c5b.akpm@osdl.org>
Andrew Morton wrote:
>>>How important is this feature?
>>
>>Without this feature, an application has no way to figure out if a given
>>segment is hugetlb or not. Applications need to know this to be able to
>>handle alignment issues properly.
>>
>>Also, if the flag is exported via ipcs, the system administrator would
>>have a better idea about how the hugetlb pages she configured on the
>>system are getting used.
>>
>
>
> I'd suggest that any API which allows us to query the hugeness of a piece
> of memory should also work for mmap(hugetld_fd...). IOW: this capability
> shouldn't be restricted to sysv shm areas.
The capability I was talking about was the ability to figure out where
the configured hugetlb pages are going (vs is this a hugetlb page?).
I suspect that one can use lsof+/proc/pid/maps and look for hugetlbfs
mount points to gather that data. But for shared memory hugepages, we
don't have a way.
> But then again, if it was possible to write 100 lines of userspace code, we
> wouldn't need this capability at all. I bet if the userspace guys tried a
> bit harder they'd work out a way of teaching their applications to remember
> what they did.
Why do we need shmctl(IPC_STAT) then? Applications should remember what
they did :)
-Arun
next prev parent reply other threads:[~2005-11-11 2:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-09 18:46 [PATCH] Expose SHM_HUGETLB in shmctl(id, IPC_STAT, ...) Arun Sharma
2005-11-10 6:22 ` Andrew Morton
2005-11-10 18:35 ` Arun Sharma
2005-11-10 19:59 ` Andrew Morton
2005-11-10 21:41 ` Arun Sharma
2005-11-10 22:06 ` Andrew Morton
2005-11-11 2:49 ` Arun Sharma [this message]
2005-11-11 3:12 ` Andrew Morton
2005-11-12 7:19 ` Michael Kerrisk
2005-11-12 7:38 ` Andrew Morton
2005-11-11 7:30 ` William Lee Irwin III
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=437406D4.4060304@google.com \
--to=arun.sharma@google.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rohit.seth@intel.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