Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444297 > unrolled thread
| Started by | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| First post | 2016-07-15 15:10 +0200 |
| Last post | 2016-07-18 18:30 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3/5] mm, pagevec: Release/reacquire lru_lock on pgdat change Mel Gorman <mgorman@techsingularity.net> - 2016-07-15 15:10 +0200
Re: [PATCH 3/5] mm, pagevec: Release/reacquire lru_lock on pgdat change Minchan Kim <minchan@kernel.org> - 2016-07-15 18:00 +0200
Re: [PATCH 3/5] mm, pagevec: Release/reacquire lru_lock on pgdat change Johannes Weiner <hannes@cmpxchg.org> - 2016-07-18 18:30 +0200
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Date | 2016-07-15 15:10 +0200 |
| Subject | [PATCH 3/5] mm, pagevec: Release/reacquire lru_lock on pgdat change |
| Message-ID | <rVb2r-7js-33@gated-at.bofh.it> |
With node-lru, the locking is based on the pgdat. Previously it was
required that a pagevec drain released one zone lru_lock and acquired
another zone lru_lock on every zone change. Now, it's only necessary if
the node changes. The end-result is fewer lock release/acquires if the
pages are all on the same node but in different zones.
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
mm/swap.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/mm/swap.c b/mm/swap.c
index 77af473635fe..75c63bb2a1da 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -179,26 +179,26 @@ static void pagevec_lru_move_fn(struct pagevec *pvec,
void *arg)
{
int i;
- struct zone *zone = NULL;
+ struct pglist_data *pgdat = NULL;
struct lruvec *lruvec;
unsigned long flags = 0;
for (i = 0; i < pagevec_count(pvec); i++) {
struct page *page = pvec->pages[i];
- struct zone *pagezone = page_zone(page);
+ struct pglist_data *pagepgdat = page_pgdat(page);
- if (pagezone != zone) {
- if (zone)
- spin_unlock_irqrestore(zone_lru_lock(zone), flags);
- zone = pagezone;
- spin_lock_irqsave(zone_lru_lock(zone), flags);
+ if (pagepgdat != pgdat) {
+ if (pgdat)
+ spin_unlock_irqrestore(&pgdat->lru_lock, flags);
+ pgdat = pagepgdat;
+ spin_lock_irqsave(&pgdat->lru_lock, flags);
}
- lruvec = mem_cgroup_page_lruvec(page, zone->zone_pgdat);
+ lruvec = mem_cgroup_page_lruvec(page, pgdat);
(*move_fn)(page, lruvec, arg);
}
- if (zone)
- spin_unlock_irqrestore(zone_lru_lock(zone), flags);
+ if (pgdat)
+ spin_unlock_irqrestore(&pgdat->lru_lock, flags);
release_pages(pvec->pages, pvec->nr, pvec->cold);
pagevec_reinit(pvec);
}
--
2.6.4
[toc] | [next] | [standalone]
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Date | 2016-07-15 18:00 +0200 |
| Subject | Re: [PATCH 3/5] mm, pagevec: Release/reacquire lru_lock on pgdat change |
| Message-ID | <rVdGV-h9-3@gated-at.bofh.it> |
| In reply to | #1444297 |
On Fri, Jul 15, 2016 at 02:09:23PM +0100, Mel Gorman wrote: > With node-lru, the locking is based on the pgdat. Previously it was > required that a pagevec drain released one zone lru_lock and acquired > another zone lru_lock on every zone change. Now, it's only necessary if > the node changes. The end-result is fewer lock release/acquires if the > pages are all on the same node but in different zones. > > Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Minchan Kim <minchan@kernel.org> check_move_unevictable_pages could be a candidate, too.
[toc] | [prev] | [next] | [standalone]
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Date | 2016-07-18 18:30 +0200 |
| Subject | Re: [PATCH 3/5] mm, pagevec: Release/reacquire lru_lock on pgdat change |
| Message-ID | <rWjAB-7K-3@gated-at.bofh.it> |
| In reply to | #1444297 |
On Fri, Jul 15, 2016 at 02:09:23PM +0100, Mel Gorman wrote: > With node-lru, the locking is based on the pgdat. Previously it was > required that a pagevec drain released one zone lru_lock and acquired > another zone lru_lock on every zone change. Now, it's only necessary if > the node changes. The end-result is fewer lock release/acquires if the > pages are all on the same node but in different zones. > > Signed-off-by: Mel Gorman <mgorman@techsingularity.net> This could make quite a difference on some workloads, from a whole series perspective, when considering that we had the round robin fair zone allocator on top of this. Page batches that span multiple nodes on the other hand are much less likely. Acked-by: Johannes Weiner <hannes@cmpxchg.org>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web