RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 831900 - system call sys_semget costs more time
Summary: system call sys_semget costs more time
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-14 03:16 UTC by slh
Modified: 2016-08-26 01:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-26 01:35:53 UTC
Target Upstream Version:
Embargoed:


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

Description slh 2012-06-14 03:16:23 UTC
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-14 03:17:53 UTC
Created attachment 591718 [details]
calls semget in a while(1) statement

Comment 3 RHEL Program Management 2012-12-14 08:26:14 UTC
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.