Re: [RFC PATCH 1/2] vmsplice unmap gifted pages for recipient

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/26/2013 08:16 AM, Robert Jennings wrote:
>>> > > +				if ((spd->flags & SPLICE_F_MOVE) &&
>>> > > +				    !buf->offset && (buf->len == PAGE_SIZE))
>>> > > +					/* Can move page aligned buf */
>>> > > +					zap_buf_page(useraddr);
>>> > >  				buf->flags |= PIPE_BUF_FLAG_GIFT;
>>> > > +			}
>> > 
>> > There isn't quite enough context here, but is it going to do this
>> > zap_buf_page() very often?  Seems a bit wasteful to do the up/down and
>> > find_vma() every trip through the loop.
> The call to zap_buf_page() is in a loop where each pipe buffer is being
> processed, but in that loop we have a pipe_wait() where we schedule().
> So as things are structured I don't have the ability to hold mmap_sem
> for multiple find_vma() calls.

You can hold a semaphore over a schedule(). :)

You could also theoretically hold mmap_sem and only drop it on actual
cases when you reschedule if you were afraid of holding mmap_sem for
long periods of time (even though it's a read).


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux