linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andrea Arcangeli <andrea@suse.de>,
	linux-mm@kvack.org
Subject: Re: [patch -mm 4/5] mm: test and set zone reclaim lock before starting reclaim
Date: Mon, 24 Sep 2007 13:11:40 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0709241309120.30222@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <alpine.DEB.0.9999.0709241211240.16397@chino.kir.corp.google.com>

On Mon, 24 Sep 2007, David Rientjes wrote:

> > > +static inline int zone_test_and_set_flag(struct zone *zone, zone_flags_t flag)
> > > +{
> > > +	return test_and_set_bit(flag, &zone->flags);
> > > +}
> > 
> > Missing blank line.
> > 
> 
> The only blank line for inlined functions added to mmzone.h for zone 
> flag support is between the generic flavors that set, test and set, or 
> clear the flags and the explicit flavors that test specific bits; so this 
> newline behavior is correct as written.
> 
> I was hoping to avoid doing things like
> 
> 	#define ZoneSetReclaimLocked(zone)	zone_set_flag((zone),	\
> 							ZONE_RECLAIM_LOCKED)

Not sure what the #define is supposed to tell me.

Please add the corresponding blank lines at the end of functions. One 
function seems to be running into the next.

It should look like the rest of mmzone.h:

static inline struct page *__section_mem_map_addr(struct mem_section *section)
{
        unsigned long map = section->section_mem_map;
        map &= SECTION_MAP_MASK;
        return (struct page *)map;
}

static inline int valid_section(struct mem_section *section)
{
        return (section && (section->section_mem_map & SECTION_MARKED_PRESENT));
}

static inline int section_has_mem_map(struct mem_section *section)
{
        return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP));
}

static inline int valid_section_nr(unsigned long nr)
{
        return valid_section(__nr_to_section(nr));
}

static inline struct mem_section *__pfn_to_section(unsigned long pfn)
{
        return __nr_to_section(pfn_to_section_nr(pfn));
}

static inline int pfn_valid(unsigned long pfn)
{
        if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
                return 0;
        return valid_section(__nr_to_section(pfn_to_section_nr(pfn)));
}

Note that there is a empty line at the end of each function.

--
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>

  reply	other threads:[~2007-09-24 20:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22 17:47 [patch -mm 1/5] oom: prevent including sched.h in header file David Rientjes
2007-09-22 17:47 ` [patch -mm 2/5] oom: add header file to Kbuild as unifdef David Rientjes
2007-09-22 17:47   ` [patch -mm 3/5] oom: convert zone_scan_lock from mutex to spinlock David Rientjes
2007-09-22 17:47     ` [patch -mm 4/5] mm: test and set zone reclaim lock before starting reclaim David Rientjes
2007-09-22 17:47       ` [patch -mm 5/5] oom: add sysctl to dump tasks memory state David Rientjes
2007-09-25  4:37         ` Balbir Singh
2007-09-25  4:57           ` David Rientjes
2007-09-26 20:06         ` Andrew Morton
2007-09-26 20:46           ` David Rientjes
2007-09-26 21:47             ` Andrew Morton
2007-09-27  6:15               ` David Rientjes
2007-09-24 19:05       ` [patch -mm 4/5] mm: test and set zone reclaim lock before starting reclaim Christoph Lameter
2007-09-24 19:14         ` David Rientjes
2007-09-24 20:11           ` Christoph Lameter [this message]
2007-09-24 21:02           ` David Rientjes
2007-09-24 21:09             ` Christoph Lameter
2007-09-25  4:26       ` Balbir Singh
2007-09-25  4:34         ` David Rientjes
2007-09-25  6:17           ` Balbir Singh
2007-09-25  6:29             ` David Rientjes
2007-09-25 21:15             ` Christoph Lameter
2007-09-25 21:19               ` David Rientjes
2007-09-25 21:39                 ` Christoph Lameter
2007-09-25 21:43                   ` David Rientjes
2007-09-25 21:14           ` Christoph Lameter
2007-09-25 21:17             ` David Rientjes

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=Pine.LNX.4.64.0709241309120.30222@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@suse.de \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.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