From: Mel Gorman <mgorman@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 13/15] sched: Set preferred NUMA node based on number of private faults
Date: Mon, 8 Jul 2013 10:23:03 +0100 [thread overview]
Message-ID: <20130708092303.GZ1875@suse.de> (raw)
In-Reply-To: <20130706104107.GR18898@dyad.programming.kicks-ass.net>
On Sat, Jul 06, 2013 at 12:41:07PM +0200, Peter Zijlstra wrote:
> On Sat, Jul 06, 2013 at 12:09:00AM +0100, Mel Gorman wrote:
> > +++ b/include/linux/mm.h
> > @@ -582,11 +582,11 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
> > * sets it, so none of the operations on it need to be atomic.
> > */
> >
> > -/* Page flags: | [SECTION] | [NODE] | ZONE | [LAST_NID] | ... | FLAGS | */
> > +/* Page flags: | [SECTION] | [NODE] | ZONE | [LAST_NIDPID] | ... | FLAGS | */
> > #define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH)
> > #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH)
> > #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
> > -#define LAST_NID_PGOFF (ZONES_PGOFF - LAST_NID_WIDTH)
> > +#define LAST_NIDPID_PGOFF (ZONES_PGOFF - LAST_NIDPID_WIDTH)
>
> I saw the same with Ingo's patch doing the similar thing. But why do we fuse
> these two into a single field? Would it not make more sense to have them be
> separate fields?
>
> Yes I get we update and read them together, and we could still do that with
> appropriate helper function, but they are two independent values stored in the
> page flags.
>
There were two reasons. First, it is because we update and read them
together. Second, it's all or nothing if this field is included in the
page->flags or not. I know this could also be done with helpers and
other tricks but I did not think it would be any easier to understand.
--
Mel Gorman
SUSE Labs
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mgorman@suse.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 13/15] sched: Set preferred NUMA node based on number of private faults
Date: Mon, 8 Jul 2013 10:23:03 +0100 [thread overview]
Message-ID: <20130708092303.GZ1875@suse.de> (raw)
In-Reply-To: <20130706104107.GR18898@dyad.programming.kicks-ass.net>
On Sat, Jul 06, 2013 at 12:41:07PM +0200, Peter Zijlstra wrote:
> On Sat, Jul 06, 2013 at 12:09:00AM +0100, Mel Gorman wrote:
> > +++ b/include/linux/mm.h
> > @@ -582,11 +582,11 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
> > * sets it, so none of the operations on it need to be atomic.
> > */
> >
> > -/* Page flags: | [SECTION] | [NODE] | ZONE | [LAST_NID] | ... | FLAGS | */
> > +/* Page flags: | [SECTION] | [NODE] | ZONE | [LAST_NIDPID] | ... | FLAGS | */
> > #define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH)
> > #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH)
> > #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
> > -#define LAST_NID_PGOFF (ZONES_PGOFF - LAST_NID_WIDTH)
> > +#define LAST_NIDPID_PGOFF (ZONES_PGOFF - LAST_NIDPID_WIDTH)
>
> I saw the same with Ingo's patch doing the similar thing. But why do we fuse
> these two into a single field? Would it not make more sense to have them be
> separate fields?
>
> Yes I get we update and read them together, and we could still do that with
> appropriate helper function, but they are two independent values stored in the
> page flags.
>
There were two reasons. First, it is because we update and read them
together. Second, it's all or nothing if this field is included in the
page->flags or not. I know this could also be done with helpers and
other tricks but I did not think it would be any easier to understand.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2013-07-08 9:23 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 23:08 [PATCH 0/15] Basic scheduler support for automatic NUMA balancing V3 Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 01/15] mm: numa: Document automatic NUMA balancing sysctls Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 02/15] sched: Track NUMA hinting faults on per-node basis Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 03/15] sched: Select a preferred node with the most numa hinting faults Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 04/15] sched: Update NUMA hinting faults once per scan Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 05/15] sched: Favour moving tasks towards the preferred node Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 06/15] sched: Reschedule task on preferred NUMA node once selected Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-06 10:38 ` Peter Zijlstra
2013-07-06 10:38 ` Peter Zijlstra
2013-07-08 8:34 ` Mel Gorman
2013-07-08 8:34 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 07/15] sched: Add infrastructure for split shared/private accounting of NUMA hinting faults Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 08/15] sched: Increase NUMA PTE scanning when a new preferred node is selected Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 09/15] sched: Check current->mm before allocating NUMA faults Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 10/15] sched: Set the scan rate proportional to the size of the task being scanned Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 11/15] mm: numa: Scan pages with elevated page_mapcount Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:08 ` [PATCH 12/15] sched: Remove check that skips small VMAs Mel Gorman
2013-07-05 23:08 ` Mel Gorman
2013-07-05 23:09 ` [PATCH 13/15] sched: Set preferred NUMA node based on number of private faults Mel Gorman
2013-07-05 23:09 ` Mel Gorman
2013-07-06 10:41 ` Peter Zijlstra
2013-07-06 10:41 ` Peter Zijlstra
2013-07-08 9:23 ` Mel Gorman [this message]
2013-07-08 9:23 ` Mel Gorman
2013-07-06 10:44 ` Peter Zijlstra
2013-07-06 10:44 ` Peter Zijlstra
2013-07-05 23:09 ` [PATCH 14/15] sched: Account for the number of preferred tasks running on a node when selecting a preferred node Mel Gorman
2013-07-05 23:09 ` Mel Gorman
2013-07-06 10:46 ` Peter Zijlstra
2013-07-06 10:46 ` Peter Zijlstra
2013-07-05 23:09 ` [PATCH 15/15] sched: Favour moving tasks towards nodes that incurred more faults Mel Gorman
2013-07-05 23:09 ` Mel Gorman
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=20130708092303.GZ1875@suse.de \
--to=mgorman@suse.de \
--cc=aarcange@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.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 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.