Bug 1351024 - Implement API to get page aligned iobufs in iobuf.c
Summary: Implement API to get page aligned iobufs in iobuf.c
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.7.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Krutika Dhananjay
QA Contact:
URL:
Whiteboard:
Depends On: 1343838 1351025
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-29 05:15 UTC by Krutika Dhananjay
Modified: 2016-07-20 13:55 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.7.13
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1343838
Environment:
Last Closed: 2016-07-20 13:55:32 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Krutika Dhananjay 2016-06-29 05:15:34 UTC
+++ This bug was initially created as a clone of Bug #1343838 +++

Description of problem:

One of the consumers of a page aligned buffer would be posix's readv fop on O_DIRECT fds. Today the way it works is by getting a page-aligned buffer through calloc, pread()ing into this buffer and then copying its contents into a newly created iobuf's ptr. This results in an extra memcpy() which can be avoided if we could implement an api that would return an iobuf whose ptr is mem-aligned. That way the iobuf->ptr can be directly passed to sys_preadv() as a parameter by posix translator.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Vijay Bellur on 2016-06-08 07:16:33 EDT ---

REVIEW: http://review.gluster.org/14672 (libglusterfs: Implement API that provides page-aligned iobufs) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-08 22:33:49 EDT ---

REVIEW: http://review.gluster.org/14672 (libglusterfs: Implement API that provides page-aligned iobufs) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-09 05:34:35 EDT ---

REVIEW: http://review.gluster.org/14672 (libglusterfs: Implement API that provides page-aligned iobufs) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-28 17:52:46 EDT ---

COMMIT: http://review.gluster.org/14672 committed in master by Jeff Darcy (jdarcy) 
------
commit 1e60f9746cf7cb8ce34e2b1572410c39b11d7664
Author: Krutika Dhananjay <kdhananj>
Date:   Tue Jun 7 16:27:34 2016 +0530

    libglusterfs: Implement API that provides page-aligned iobufs
    
    One of the consumers of a page aligned buffer would be posix's
    readv fop on O_DIRECT fds. Today the way it works is by getting
    a page-aligned buffer through calloc, pread()ing into this buffer
    and then copying its contents into a newly created iobuf's ptr.
    This results in an extra memcpy() which can be avoided if we could
    implement an api that would return an iobuf whose ptr is
    page-aligned. That way the iobuf->ptr can be directly passed to
    sys_pread() as a parameter by posix translator.
    
    Change-Id: I385139bc6ee309fc501034b3af8f7814fab8cd65
    BUG: 1343838
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/14672
    CentOS-regression: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Zhou Zhengping <johnzzpcrystal>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 1 Vijay Bellur 2016-06-29 05:54:20 UTC
REVIEW: http://review.gluster.org/14826 (libglusterfs: Implement API that provides page-aligned iobufs) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 2 Vijay Bellur 2016-06-30 04:37:11 UTC
COMMIT: http://review.gluster.org/14826 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit af1ab7266edf91216e27484c505c78401f092e13
Author: Krutika Dhananjay <kdhananj>
Date:   Tue Jun 7 16:27:34 2016 +0530

    libglusterfs: Implement API that provides page-aligned iobufs
    
            Backport of: http://review.gluster.org/14672
    
    One of the consumers of a page aligned buffer would be posix's
    readv fop on O_DIRECT fds. Today the way it works is by getting
    a page-aligned buffer through calloc, pread()ing into this buffer
    and then copying its contents into a newly created iobuf's ptr.
    This results in an extra memcpy() which can be avoided if we could
    implement an api that would return an iobuf whose ptr is
    page-aligned. That way the iobuf->ptr can be directly passed to
    sys_pread() as a parameter by posix translator.
    
    Change-Id: Ie44c300dc773fef8e1669d609987d47dbd340ac2
    BUG: 1351024
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/14826
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Zhou Zhengping <johnzzpcrystal>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Kaushal 2016-07-20 13:55:32 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.13, please open a new bug report.

glusterfs-3.7.13 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://www.gluster.org/pipermail/gluster-users/2016-July/027604.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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