Bug 510257

Summary: allow more flexibility for read_ahead_kb store
Product: Red Hat Enterprise Linux 5 Reporter: Bryn M. Reeves <bmr>
Component: kernelAssignee: Danny Feng <dfeng>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: cward, dzickus, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 07:30:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 526775, 533192    
Attachments:
Description Flags
Commit from comment #0 rediffed for RHEL5 none

Description Bryn M. Reeves 2009-07-08 14:03:19 UTC
Description of problem:
RHEL5 inherited a bug from upstream that applies more restrictive checks to the setting of a device's read_ahead_kb parameter when setting the parameter via sysfs instead of via the BLKRASET ioctl:

commit da20a20f3b5c175648fa797c899dd577e4dacb51
Author: Jens Axboe <axboe>
Date:   Fri Jul 21 20:30:28 2006 +0200

    [PATCH] ll_rw_blk: allow more flexibility for read_ahead_kb store
    
    It can make sense to set read-ahead larger than a single request.
    We should not be enforcing such policy on the user. Additionally,
    using the BLKRASET ioctl doesn't impose such a restriction. So
    additionally we now expose identical behaviour through the two.
    
    Issue also reported by Anton <cbou>
    
    Signed-off-by: Jens Axboe <axboe>

Version-Release number of selected component (if applicable):
2.6.18-157.el5

How reproducible:
100%

Steps to Reproduce:
1. echo 2048 > /sys/block/<dev>/queue/read_ahead_kb
2. cat /sys/block/<dev>/queue/read_ahead_kb
3. blockdev --setra 4096 /dev/<dev>
4. cat /sys/block/<dev>/queue/read_ahead_kb
  
Actual results:
# echo 2048 > /sys/block/sda/queue/read_ahead_kb 
# cat /sys/block/sda/queue/read_ahead_kb
512
#  blockdev --setra 4096 /dev/sda
# cat /sys/block/sda/queue/read_ahead_kb
2048



Expected results:
# echo 2048 > /sys/block/sda/queue/read_ahead_kb 
# cat /sys/block/sda/queue/read_ahead_kb
2048
#  blockdev --setra 4096 /dev/sda
# cat /sys/block/sda/queue/read_ahead_kb
2048

Additional info:

Comment 1 Bryn M. Reeves 2009-07-08 14:07:05 UTC
Created attachment 350941 [details]
Commit from comment #0 rediffed for RHEL5

Comment 3 RHEL Program Management 2009-09-25 17:39:27 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Don Zickus 2009-10-06 19:38:21 UTC
in kernel-2.6.18-168.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 6 Chris Ward 2010-02-11 10:12:36 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 7 Bryn M. Reeves 2010-02-11 12:57:52 UTC
Verified in 2.6.18-182.el5:

[root@pe1950-5 ~]# uname -r
2.6.18-182.el5
[root@pe1950-5 ~]# echo 2048 > /sys/block/sda/queue/read_ahead_kb
[root@pe1950-5 ~]# cat /sys/block/sda/queue/read_ahead_kb
2048
[root@pe1950-5 ~]# blockdev --setra 4096 /dev/sda 
[root@pe1950-5 ~]# cat /sys/block/sda/queue/read_ahead_kb
2048

Comment 9 errata-xmlrpc 2010-03-30 07:30:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html