linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* REGRESSION: Performance regressions from switching anon_vma->lock to mutex
@ 2011-06-15  0:29 Tim Chen
  2011-06-15  0:36 ` Andi Kleen
                   ` (3 more replies)
  0 siblings, 4 replies; 86+ messages in thread
From: Tim Chen @ 2011-06-15  0:29 UTC (permalink / raw)
  To: Peter Zijlstra, Andrew Morton, Linus Torvalds
  Cc: Hugh Dickins, KOSAKI Motohiro, Benjamin Herrenschmidt,
	David Miller, Martin Schwidefsky, Russell King, Paul Mundt,
	Jeff Dike, Richard Weinberger, Tony Luck, KAMEZAWA Hiroyuki,
	Mel Gorman, Nick Piggin, Namhyung Kim, ak, shaohua.li, alex.shi,
	linux-kernel, linux-mm, Rafael J. Wysocki

It seems like that the recent changes to make the anon_vma->lock into a
mutex (commit 2b575eb6) causes a 52% regression in throughput (2.6.39 vs
3.0-rc2) on exim mail server workload in the MOSBENCH test suite.

Our test setup is on a 4 socket Westmere EX system, with 10 cores per
socket.  40 clients are created on the test machine which send email
to the exim server residing on the sam test machine.

Exim forks off child processes to handle the incoming mail, and the
process exits after the mail delivery completes. We see quite a bit of
acquisition of the anon_vma->lock as a result.  

On 2.6.39, the contention of anon_vma->lock occupies 3.25% of cpu.
However, after the switch of the lock to mutex on 3.0-rc2, the mutex
acquisition jumps to 18.6% of cpu.  This seems to be the main cause of
the 52% throughput regression.

Other workloads which have a lot of forks/exits may be similarly
affected by this regression.  Workloads which are vm lock intensive
could be affected too.

I've listed the profile of 3.0-rc2 and 2.6.39 below for comparison.

Thanks.

Tim


---------------------------
3.0-rc2 profile:

-     18.60%          exim  [kernel.kallsyms]        [k] __mutex_lock_common.clone.5 
   - __mutex_lock_common.clone.5                                                     
      - 99.99% __mutex_lock_slowpath                                                 
         - mutex_lock                                                                
            - 99.54% anon_vma_lock.clone.10                                          
               + 38.99% anon_vma_clone                                               
               + 37.56% unlink_anon_vmas                                             
               + 11.92% anon_vma_fork                                                
               + 11.53% anon_vma_free                                                
+      4.03%          exim  [kernel.kallsyms]        [k] _raw_spin_lock_irqsave      
-      3.00%          exim  [kernel.kallsyms]        [k] do_raw_spin_lock            
   - do_raw_spin_lock                                                                
      - 94.11% _raw_spin_lock                                                        
         + 47.32% __mutex_lock_common.clone.5                                        
         + 14.23% __mutex_unlock_slowpath                                            
         + 4.06% handle_pte_fault                                                    
         + 3.81% __do_fault                                                          
         + 3.16% unmap_vmas                                                          
         + 2.46% lock_flocks                                                         
         + 2.43% copy_pte_range                                                      
         + 2.28% __task_rq_lock                                                      
         + 1.30% __percpu_counter_add                                                
         + 1.30% dput                                                                
         + 1.27% add_partial                                                         
         + 1.24% free_pcppages_bulk                                                  
         + 1.07% d_alloc                                                             
         + 1.07% get_page_from_freelist                                              
         + 1.02% complete_walk                                                       
         + 0.89% dget                                                                
         + 0.71% new_inode                                                           
         + 0.61% __mod_timer                                                         
         + 0.58% dup_fd                                                              
         + 0.50% double_rq_lock                                                      
      + 3.66% _raw_spin_lock_irq                                                     
      + 0.87% _raw_spin_lock_bh                                                      
+      2.90%          exim  [kernel.kallsyms]        [k] page_fault                  
+      2.25%          exim  [kernel.kallsyms]        [k] mutex_unlock     


-----------------------------------

2.6.39 profile:
+      4.84%          exim  [kernel.kallsyms]        [k] page_fault
+      3.83%          exim  [kernel.kallsyms]        [k] clear_page_c
-      3.25%          exim  [kernel.kallsyms]        [k] do_raw_spin_lock
   - do_raw_spin_lock
      - 91.86% _raw_spin_lock
         + 14.16% unlink_anon_vmas
         + 12.54% unlink_file_vma
         + 7.30% anon_vma_clone_batch
         + 6.17% dup_mm
         + 5.77% __do_fault
         + 5.77% __pte_alloc
         + 5.31% lock_flocks
        ...
+      3.22%          exim  [kernel.kallsyms]        [k] unmap_vmas
+      2.27%          exim  [kernel.kallsyms]        [k] page_cache_get_speculative
+      2.02%          exim  [kernel.kallsyms]        [k] copy_page_c
+      1.63%          exim  [kernel.kallsyms]        [k] __list_del_entry
+      1.58%          exim  [kernel.kallsyms]        [k] get_page_from_freelist



--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 86+ messages in thread

end of thread, other threads:[~2011-06-18  8:09 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15  0:29 REGRESSION: Performance regressions from switching anon_vma->lock to mutex Tim Chen
2011-06-15  0:36 ` Andi Kleen
2011-06-17 19:07   ` Ingo Molnar
2011-06-15  1:21 ` Linus Torvalds
2011-06-15  3:42   ` Linus Torvalds
2011-06-15  1:26 ` Shaohua Li
2011-06-15 11:52   ` Peter Zijlstra
2011-06-15 12:49     ` Peter Zijlstra
2011-06-15 16:18     ` Andi Kleen
2011-06-15 16:45       ` Peter Zijlstra
2011-06-15 16:47         ` Andi Kleen
2011-06-15 18:43         ` Tim Chen
2011-06-15 20:32           ` Peter Zijlstra
2011-06-15 20:57             ` Andi Kleen
2011-06-15 21:12               ` Tim Chen
2011-06-15 21:37                 ` Peter Zijlstra
2011-06-15 21:51                   ` Linus Torvalds
2011-06-15 22:19                     ` Andi Kleen
2011-06-16  0:16                       ` Linus Torvalds
2011-06-16 20:14                         ` Andi Kleen
2011-06-16 20:37                           ` Linus Torvalds
2011-06-17  0:24                             ` Andi Kleen
2011-06-17  9:13                               ` Ingo Molnar
2011-06-15 22:15                   ` Andi Kleen
2011-06-16  1:08                   ` Tim Chen
2011-06-16  1:50                   ` Linus Torvalds
2011-06-16 20:26                     ` Tim Chen
2011-06-16 20:47                       ` Linus Torvalds
2011-06-16 21:05                         ` Linus Torvalds
2011-06-16 21:06                           ` Linus Torvalds
2011-06-16 21:26                             ` Linus Torvalds
2011-06-17  3:58                               ` Linus Torvalds
2011-06-17 11:28                                 ` Peter Zijlstra
2011-06-17 11:54                                   ` Peter Zijlstra
2011-06-17 16:36                                   ` Linus Torvalds
2011-06-17 17:41                                     ` Hugh Dickins
2011-06-17 17:55                                       ` Peter Zijlstra
2011-06-17 18:01                                       ` Linus Torvalds
2011-06-17 18:18                                         ` Peter Zijlstra
2011-06-17 18:32                                           ` Peter Zijlstra
2011-06-17 18:39                                             ` Linus Torvalds
2011-06-17 18:41                                               ` Linus Torvalds
2011-06-17 20:19                                               ` Tim Chen
2011-06-17 22:20                                               ` Hugh Dickins
2011-06-18  4:47                                                 ` Linus Torvalds
2011-06-17 19:53                                             ` [PATCH] mm, memory-failure: Fix spinlock vs mutex order Peter Zijlstra
2011-06-17 20:04                                               ` Andi Kleen
2011-06-17 16:46                                   ` REGRESSION: Performance regressions from switching anon_vma->lock to mutex Linus Torvalds
2011-06-17 17:28                                     ` Linus Torvalds
2011-06-17 19:40                                     ` Andi Kleen
2011-06-18  8:08                                       ` Ingo Molnar
2011-06-17 18:22                                 ` Tim Chen
2011-06-17 19:05                                   ` Ray Lee
2011-06-16 22:00                           ` Andi Kleen
2011-06-15 10:36 ` Peter Zijlstra
2011-06-15 10:58   ` Peter Zijlstra
2011-06-15 11:41     ` Peter Zijlstra
2011-06-15 19:11     ` Linus Torvalds
2011-06-15 19:24       ` Andrew Morton
2011-06-15 20:16         ` Ingo Molnar
2011-06-15 20:55           ` Linus Torvalds
2011-06-15 20:12       ` [GIT PULL] " Ingo Molnar
2011-06-15 20:29         ` Paul E. McKenney
2011-06-15 20:47           ` Linus Torvalds
2011-06-15 20:54             ` Paul E. McKenney
2011-06-15 21:05         ` Linus Torvalds
2011-06-15 21:15           ` Paul E. McKenney
2011-06-15 21:27             ` Linus Torvalds
2011-06-16  7:03           ` Ingo Molnar
2011-06-16 17:16             ` Paul E. McKenney
2011-06-16 20:25               ` Ingo Molnar
2011-06-16 21:01                 ` Frederic Weisbecker
2011-06-16 23:02                   ` Ingo Molnar
2011-06-17 15:19                     ` Frederic Weisbecker
2011-06-16 21:02                 ` Andi Kleen
2011-06-16 22:21                 ` Benjamin Herrenschmidt
2011-06-16 22:38                   ` Ingo Molnar
2011-06-16 22:47                     ` Andi Kleen
2011-06-16 22:58                       ` Ingo Molnar
2011-06-17  0:45                         ` Paul E. McKenney
2011-06-17  9:43                           ` Ingo Molnar
2011-06-17 16:48                             ` Paul E. McKenney
2011-06-16 23:37                 ` Paul E. McKenney
2011-06-15 20:13       ` Tim Chen
2011-06-15 20:17         ` Ingo Molnar
2011-06-15 20:21           ` Tim Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).