Re: Poor thread performance on Linux vs. Solaris
Bill Soudan <[email protected]>
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Organization | SunGard Trading Systems, Inc. |
| Message-ID | <[email protected]> |
On Monday 08 September 2003 2:48 pm, Perez-Gonzalez, Inaky wrote: > It'd be interesting to verify if there is still a lot of contention in > the locking. oprofile results on 2.6.0-0.test4.1.32 with Boris' futex_q_lock patch: c011e410 1149 0.923136 try_to_wake_up c011f250 1280 1.02839 schedule c014c5e0 1314 1.0557 __attach_vcache c0116cb0 1392 1.11837 mark_offset_tsc c010af6b 2181 1.75227 sysenter_past_esp c0150300 3164 2.54204 follow_page c014b6b0 3529 2.83529 mark_page_accessed c0147b60 3540 2.84413 poison_obj c011e270 4046 3.25066 kunmap_atomic c0147bf0 4628 3.71825 scan_poisoned_obj c011e1e0 4955 3.98097 kmap_atomic c0138100 24115 19.3746 do_futex c0138bcd 46827 37.622 .text.lock.futex > A question about your app: are there many different locks used at the > same time or the number is actually low? Many. I'd estimate at least 15 on the typical code path (which I'm exercising with the performance test). However, I'm not the original architect so I'm not certain, but it definitely isn't a low number like 2 or 3. > No matter how we do it, there is still a bunch of lock acquisition in > the futex code that would serialize access [specially if they are locks > within the same thread, like current->mm->page_table_lock]. > > And then we also have vcache_lock--this one is also serializing > everything, as it is taken unconditionally whenever we call > lock_futex_mm(). Oh! Hits in .text.lock.futex represent spinning for any of the locks acquired in futex.c, yes? Originally I thought it represented time spent spinning while waiting for the 'futex' lock in 'futex.c'. But's that's obviously gone after Boris' patch. Now - how to distinguish between these locks in the oprofile results? Can I add a few helper files that just contain functions to acquire/release one lock (assuming one .text.lock section is created per file)? For instance, futex_vcache_lock.c, futex_page_table_lock.c, etc? Bill STATEMENT OF CONFIDENTIALITY The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify SunGard Trading Systems immediately at (201) 499-5900 and destroy all copies of this message and any attachments.