public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Suparna Bhattacharya <suparna@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Keith Owens <kaos@sgi.com>,
	apw@shadowen.org, anton@samba.org, sds@epoch.ncsc.mil,
	ak@suse.de, raybry@sgi.com, lse-tech@lists.sourceforge.net,
	linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	mbligh@aracnet.com
Subject: Re: [Lse-tech] Re: [PATCH] [0/6] HUGETLB memory commitment
Date: Fri, 26 Mar 2004 14:28:26 +0530	[thread overview]
Message-ID: <20040326085826.GA3332@in.ibm.com> (raw)
In-Reply-To: <20040325162232.3da62aea.akpm@osdl.org>

On Thu, Mar 25, 2004 at 04:22:32PM -0800, Andrew Morton wrote:
> Keith Owens <kaos@sgi.com> wrote:
> >
> > FWIW, lkcd (crash dump) treats hugetlb pages as normal kernel pages and
> > dumps them, which is pointless and wastes a lot of time.  To avoid
> > dumping these pages in lkcd, I had to add a PG_hugetlb flag.  lkcd runs

This should already be fixed in recent versions of lkcd. It uses a
little bit of trickery to avoid an extra page flag -- hugetlb pages are 
detected as "in use" as well as reserved, unlike other reserved pages 
which helps identify them.

/* to track all used (compound + zero order) pages */
#define PageInuse(p)   (PageCompound(p) || page_count(p))

.
.

static inline int kernel_page(struct page *p)
{
        /* Need to exclude hugetlb pages. Clue: reserved but inuse */
        return (PageReserved(p) && !PageInuse(p)) || (!PageLRU(p) && PageInuse(p));
}

Regards
Suparna

> > at the page level, not mm or vma, so VM_hugetlb was not available.  In
> > set_hugetlb_mem_size()
> > 
> > 	for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) {
> > 		SetPageReserved(map);
> > 		SetPageHugetlb(map);
> > 		map++;
> > 	}
> > 
> > In dump_base.c, I changed kernel_page(), referenced_page() and
> > unreferenced_page() to test for PageHugetlb() before PageReserved().
> 
> That makes sense.
> 
> > Since you are looking at identifying hugetlb pages, could any other
> > code benefit from a PG_hugetlb flag?
> 
> In the overcommit code we don't actually have the page yet.  We're asking
> "do we have enough memory available to honour this mmap() invokation when
> it later faults in real pages".
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Lse-tech mailing list
> Lse-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lse-tech

-- 
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Lab, India


  reply	other threads:[~2004-03-26  3:27 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 16:54 [PATCH] [0/6] HUGETLB memory commitment Andy Whitcroft
2004-03-25 16:58 ` [PATCH] [1/6] " Andy Whitcroft
2004-03-25 16:59 ` [PATCH] [2/6] " Andy Whitcroft
2004-03-25 17:00 ` [PATCH] [3/6] " Andy Whitcroft
2004-03-25 17:01 ` [PATCH] [4/6] " Andy Whitcroft
2004-03-25 17:02 ` [PATCH] [5/6] " Andy Whitcroft
2004-03-25 17:03 ` [PATCH] [6/6] " Andy Whitcroft
2004-03-25 21:04 ` [PATCH] [0/6] " Andrew Morton
2004-03-25 23:27   ` Andy Whitcroft
2004-03-25 23:51     ` Andrew Morton
2004-03-25 23:59       ` Andy Whitcroft
2004-03-26  0:10         ` Keith Owens
2004-03-26  0:22           ` Andrew Morton
2004-03-26  8:58             ` Suparna Bhattacharya [this message]
2004-03-26  3:39               ` [Lse-tech] " Keith Owens
2004-03-26 17:15                 ` Suparna Bhattacharya
2004-03-26  2:01         ` Andy Whitcroft
2004-03-26  0:18       ` Martin J. Bligh
2004-03-28 18:02     ` Ray Bryant
2004-03-28 19:10       ` Martin J. Bligh
2004-03-28 21:32         ` [Lse-tech] " Ray Bryant
2004-03-29 16:50           ` Martin J. Bligh
2004-03-29 12:30         ` Andy Whitcroft
2004-03-29 20:45           ` Chen, Kenneth W
2004-03-29 20:49             ` Chen, Kenneth W
2004-03-30 12:57               ` Andy Whitcroft
2004-03-30 20:04                 ` Chen, Kenneth W
2004-03-30 21:48                   ` Andy Whitcroft
2004-03-31  1:48                     ` Andy Whitcroft
2004-03-31  8:51                       ` Chen, Kenneth W
2004-03-31 16:20                         ` Andy Whitcroft
2004-04-01 21:15                         ` Andy Whitcroft
2004-04-01 22:50                           ` Andy Whitcroft
2004-04-01 23:09                           ` Chen, Kenneth W
2004-04-03  3:57                             ` [PATCH] " Ray Bryant
2004-04-04  3:31                               ` Chen, Kenneth W
2004-04-04 22:15                                 ` Ray Bryant
2004-04-05 15:26                                 ` [Lse-tech] " Ray Bryant
2004-04-05 17:01                                   ` Chen, Kenneth W
2004-04-05 18:22                                     ` Ray Bryant
2004-04-05 23:18                                       ` Chen, Kenneth W
2004-04-06  1:05                                         ` Ray Bryant
2004-04-06 16:14                                         ` Andy Whitcroft
2004-04-06 17:40                                           ` Chen, Kenneth W

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=20040326085826.GA3332@in.ibm.com \
    --to=suparna@in.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=apw@shadowen.org \
    --cc=kaos@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=mbligh@aracnet.com \
    --cc=raybry@sgi.com \
    --cc=sds@epoch.ncsc.mil \
    /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