Bug 831900 - system call sys_semget costs more time
system call sys_semget costs more time
Status: CLOSED DEFERRED
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.2
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Red Hat Kernel Manager
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 23:16 EDT by slh
Modified: 2016-08-25 21:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-25 21:35:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
calls semget 1 millions times (1.32 KB, text/x-csrc)
2012-06-13 23:16 EDT, slh
no flags Details
calls semget in a while(1) statement (944 bytes, text/x-csrc)
2012-06-13 23:17 EDT, slh
no flags Details

  None (edit)
Description slh 2012-06-13 23:16:23 EDT
Created attachment 591717 [details]
calls semget 1 millions times

Description of problem:
It seemed that the system call sys_semget costs more time than that in rhel 5.


Version-Release number of selected component (if applicable):
Rhel-6.2
kernel-2.6.32-220

How reproducible:
compile the and execute the two programs a(calls semget for 1 million times ) and b(calls semget in a while(1) statement) on rhel5 and rhel6 .

Steps to Reproduce:
1.On rhel5, execute a singlely , then execute b and re-execute a , compare the results(time cost) outputed by a.
2.On rhel6, execute a singlely , then execute b and re-execute a , compare the results(time cost) outputed by a.
3.
  
Actual results:

DELL OPTIPLEX 380 (Pentium Dual-Core E5800 ,4G RAM)
On rhel5 , a costs about 0.2 seconds when it is executed singley , and costs about 0.5 seconds when b is running.
On rhel6 , a costs about 0.2 seconds when it is executed singley , but costs about 7 seconds when b is running.
 

Expected results:
At least ,we should get the similar results . 

Additional Info:
I searched it on google , and found that the lock in sys_semget had been changed from mutex to rw_semaphore .
It seemed that rw_semaphore down_write() was not as efficient as mutex's mutex_lock(), it was slower.
Comment 1 slh 2012-06-13 23:17:53 EDT
Created attachment 591718 [details]
calls semget in a while(1) statement
Comment 3 RHEL Product and Program Management 2012-12-14 03:26:14 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Note You need to log in before you can comment on or make changes to this bug.