Re: a patch to improve cephfs direct io performance

2015-10-08 Thread Yan, Zheng
On Wed, Sep 30, 2015 at 5:40 PM, zhucaifeng wrote: > Hi, Yan > > iov_iter APIs seems unsuitable for the direct io manipulation below. > iov_iter APIs > hide how to iterate over elements, whileas dio_xxx below explicitly control > over > the iteration. They conflict

Re: a patch to improve cephfs direct io performance

2015-09-30 Thread zhucaifeng
Hi, Yan iov_iter APIs seems unsuitable for the direct io manipulation below. iov_iter APIs hide how to iterate over elements, whileas dio_xxx below explicitly control over the iteration. They conflict with each other in the principle. The patch for the newest kernel branch is below. Best

Re: a patch to improve cephfs direct io performance

2015-09-30 Thread Yan, Zheng
On Wed, Sep 30, 2015 at 5:40 PM, zhucaifeng wrote: > Hi, Yan > > iov_iter APIs seems unsuitable for the direct io manipulation below. > iov_iter APIs > hide how to iterate over elements, whileas dio_xxx below explicitly control > over > the iteration. They conflict

Re: a patch to improve cephfs direct io performance

2015-09-30 Thread zhucaifeng
Hi, Yan dio_get_pagevlen() calculate the length sum of multiple iovs that can be combined into one page vector. If needed, the length sum may be shortened by ceph_osdc_new_request() in ceph_sync_direct_write(). Nevertheless, the number of pages, derived from the length sum, may expand across

Re: a patch to improve cephfs direct io performance

2015-09-30 Thread zhucaifeng
Hi, Yan dio_get_pagevlen() calculate the length sum of multiple iovs that can be combined into one page vector. If needed, the length sum may be shortened by ceph_osdc_new_request() in ceph_sync_direct_write(). Nevertheless, the number of pages, derived from the length sum, may expand across

Re: a patch to improve cephfs direct io performance

2015-09-30 Thread zhucaifeng
Hi, Yan dio_get_pagevlen() calculate the length sum of multiple iovs that can be combined into one page vector. If needed, the length sum may be shortened by ceph_osdc_new_request() in ceph_sync_direct_write(). Nevertheless, the number of pages, derived from the length sum, may expand across

Re: a patch to improve cephfs direct io performance

2015-09-27 Thread zhucaifeng
Hi, Yan Your comment is insightful. It is about the loop invariant, the condition which must be satisfied when iovs can be combined into one page vector. The loop invariant is ensured in function dio_get_pagevlen. Note that dio_get_pagevlen should be called before dio_alloc_pagev, so in

Re: a patch to improve cephfs direct io performance

2015-09-27 Thread Yan, Zheng
Hi, zhucaifeng The patch generally looks good. But I think there is minor flaw, see my comment below. Besides, could you write a patch for the newest kernel (it's easier because there is iov_iter_get_pages() helper). On Fri, Sep 25, 2015 at 11:52 AM, zhucaifeng

a patch to improve cephfs direct io performance

2015-09-24 Thread zhucaifeng
Hi, all When using cephfs, we find that cephfs direct io is very slow. For example, installing Windows 7 takes more than 1 hour on a virtual machine whose disk is a file in cephfs. The cause is that when doing direct io, both ceph_sync_direct_write and ceph_sync_read iterate iov elements one by