All of lore.kernel.org
 help / color / mirror / Atom feed
* apparmor: global buffers spin lock may get contended
@ 2021-07-13 13:19 Sergey Senozhatsky
  2021-08-15  9:47 ` John Johansen
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Sergey Senozhatsky @ 2021-07-13 13:19 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, John Johansen
  Cc: Peter Zijlstra, Tomasz Figa, linux-kernel, linux-security-module

Hi,

We've notices that apparmor has switched from using per-CPU buffer pool
and per-CPU spin_lock to a global spin_lock in df323337e507a0009d3db1ea.

This seems to be causing some contention on our build machines (with
quite a bit of cores). Because that global spin lock is a part of the
stat() sys call (and perhaps some other)

E.g.

-    9.29%     0.00%  clang++          [kernel.vmlinux]                        
   - 9.28% entry_SYSCALL_64_after_hwframe                                      
      - 8.98% do_syscall_64                                                    
         - 7.43% __do_sys_newlstat                                            
            - 7.43% vfs_statx                                                  
               - 7.18% security_inode_getattr                                  
                  - 7.15% apparmor_inode_getattr                              
                     - aa_path_perm                                            
                        - 3.53% aa_get_buffer                                  
                           - 3.47% _raw_spin_lock                              
                                3.44% native_queued_spin_lock_slowpath        
                        - 3.49% aa_put_buffer.part.0                          
                           - 3.45% _raw_spin_lock                              
                                3.43% native_queued_spin_lock_slowpath   

Can we fix this contention?

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

end of thread, other threads:[~2023-10-26  5:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-13 13:19 apparmor: global buffers spin lock may get contended Sergey Senozhatsky
2021-08-15  9:47 ` John Johansen
2022-10-28  9:34 ` John Johansen
2022-10-31  3:52   ` Sergey Senozhatsky
2022-10-31  3:55     ` John Johansen
2022-10-31  4:04       ` Sergey Senozhatsky
2023-02-17  0:03         ` John Johansen
2023-02-17  0:08       ` [PATCH v3] " John Johansen
2023-02-17 10:44         ` Sebastian Andrzej Siewior
2023-02-20  8:42           ` John Johansen
2023-02-21 21:27             ` Anil Altinay
2023-06-26 23:35               ` Anil Altinay
     [not found]               ` <CACCxZWO-+M-J_enENr7q1WDcu1U8vYFoytqJxAh=x-nuP268zA@mail.gmail.com>
2023-06-27  0:31                 ` John Johansen
2023-10-06  4:18                   ` Sergey Senozhatsky
2023-10-17  9:21                     ` [PATCH v5 0/4] apparmor: cache buffers on percpu list if there is lock, contention John Johansen
2023-10-17  9:23                       ` [PATCH v5 1/4] " John Johansen
2023-10-17  9:24                       ` [PATCH v5 2/4] apparmor: exponential backoff on cache buffer contention John Johansen
2023-10-17  9:25                       ` [PATCH v5 3/4] apparmor: experiment with faster backoff on global buffer John Johansen
2023-10-17  9:26                       ` [PATCH v5 4/4] apparmor: limit the number of buffers in percpu cache John Johansen
2023-10-26  5:13                       ` [PATCH v5 0/4] apparmor: cache buffers on percpu list if there is lock, contention Sergey Senozhatsky
     [not found] ` <20221030013028.3557-1-hdanton@sina.com>
2022-10-30  6:32   ` apparmor: global buffers spin lock may get contended John Johansen

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.