Re: [PATCH 1/2] mm/mmu_notifier: init notifier if necessary

2012-08-30 Thread Andrew Morton
On Sat, 25 Aug 2012 17:47:50 +0800 Gavin Shan wrote: > >> --- a/mm/mmu_notifier.c > >> +++ b/mm/mmu_notifier.c > >> @@ -192,22 +192,23 @@ static int do_mmu_notifier_register(struct > >> mmu_notifier *mn, > >> > >>BUG_ON(atomic_read(&mm->mm_users) <= 0); > >> > >> - ret = -ENOMEM; > >> -

Re: [PATCH 1/2] mm/mmu_notifier: init notifier if necessary

2012-08-24 Thread Andrew Morton
On Fri, 24 Aug 2012 22:37:55 +0800 Wanpeng Li wrote: > From: Gavin Shan > > While registering MMU notifier, new instance of MMU notifier_mm will > be allocated and later free'd if currrent mm_struct's MMU notifier_mm > has been initialized. That cause some overhead. The patch tries to > elemina

[PATCH 1/2] mm/mmu_notifier: init notifier if necessary

2012-08-24 Thread Wanpeng Li
From: Gavin Shan While registering MMU notifier, new instance of MMU notifier_mm will be allocated and later free'd if currrent mm_struct's MMU notifier_mm has been initialized. That cause some overhead. The patch tries to eleminate that. Signed-off-by: Gavin Shan Signed-off-by: Wanpeng Li ---

[PATCH 1/2] mm/mmu_notifier: init notifier if necessary

2012-08-24 Thread Wanpeng Li
From: Gavin Shan While registering MMU notifier, new instance of MMU notifier_mm will be allocated and later free'd if currrent mm_struct's MMU notifier_mm has been initialized. That cause some overhead. The patch tries to eleminate that. Signed-off-by: Gavin Shan Signed-off-by: Wanpeng Li ---