Re: [PATCH] fix count_vm_event preempt in memory compaction direct reclaim

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Arcangeli
Date: Wednesday, May 5, 2010 - 6:11 am

On Wed, May 05, 2010 at 01:51:56PM +0100, Mel Gorman wrote:

for Andrew: I'll generate a trivial reject to the exponential backoff.


You're welcome.

I updated current aa.git origin/master and origin/anon_vma_chain
branches (post THP-23*).

There's also another patch I've in my tree that you didn't picked up
and I wonder what's the issue here. This less a bugfix because it
seems to only affect lockdep, I don't know why lockdep forbids to call
migrate_prep with any lock held (in this case the mmap_sem). migrate.c
is careful to comply with it, compaction.c isn't. It's not mandatory
to succeed for compaction, so in doubt I just commented it out. It'll
also decrease the IPI load so I wasn't very concerned to re-enable it.

-----
Subject: disable migrate_prep()

From: Andrea Arcangeli <aarcange@redhat.com>

I get trouble from lockdep if I leave it enabled:

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.34-rc3 #50
-------------------------------------------------------
largepages/4965 is trying to acquire lock:
 (events){+.+.+.}, at: [<ffffffff8105b788>] flush_work+0x38/0x130

 but task is already holding lock:
  (&mm->mmap_sem){++++++}, at: [<ffffffff8141b022>] do_page_fault+0xd2/0x430


flush_work apparently wants to run free from lock and it bugs in:

	lock_map_acquire(&cwq->wq->lockdep_map);

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/mm/compaction.c b/mm/compaction.c
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -383,7 +383,9 @@ static int compact_zone(struct zone *zon
 	cc->free_pfn = cc->migrate_pfn + zone->spanned_pages;
 	cc->free_pfn &= ~(pageblock_nr_pages-1);
 
+#if 0
 	migrate_prep();
+#endif
 
 	while ((ret = compact_finished(zone, cc)) == COMPACT_CONTINUE) {
 		unsigned long nr_migrate, nr_remaining;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/14] Memory Compaction v8, Mel Gorman, (Tue Apr 20, 2:01 pm)
[PATCH 09/14] mm,compaction: Memory compaction core, Mel Gorman, (Tue Apr 20, 2:01 pm)
Re: [PATCH 01/14] mm,migration: Take a reference to the an ..., KAMEZAWA Hiroyuki, (Tue Apr 20, 7:49 pm)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Christoph Lameter, (Wed Apr 21, 7:30 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Christoph Lameter, (Wed Apr 21, 8:05 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Christoph Lameter, (Wed Apr 21, 8:31 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Christoph Lameter, (Wed Apr 21, 8:46 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Wed Apr 21, 4:59 pm)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Thu Apr 22, 2:46 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Thu Apr 22, 3:31 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Thu Apr 22, 3:51 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Christoph Lameter, (Thu Apr 22, 8:14 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Christoph Lameter, (Thu Apr 22, 12:40 pm)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Thu Apr 22, 4:52 pm)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Andrea Arcangeli, (Fri Apr 23, 11:31 am)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., Andrea Arcangeli, (Fri Apr 23, 12:39 pm)
Re: [PATCH 04/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Tue Apr 27, 3:41 am)
Re: [PATCH] fix count_vm_event preempt in memory compactio ..., Andrea Arcangeli, (Wed May 5, 6:11 am)