Hi Everyone,
I am working on improving the MTP write performance of devices in general.
I came across this code in kernel/fs/sync.c
178<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l178>int
 vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync)
179<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l179>{
180<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l180>
        if (!file->f_op || !file->f_op->fsync)
181<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l181>
                return -EINVAL;
182<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l182>
        return file->f_op->fsync(file, start, end, datasync);
183<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l183>}
184<http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/sync.c;h=14eefeb44636bd1e24240ae09fe0dd046ed013fa;hb=0e51793e162ca432fc5f04178cf82b80a92c2659#l184>EXPORT_SYMBOL(vfs_fsync_range);

can someone point out what happens if I disable this code, as I see good 
improvement in performance if I disable this.

Also this code has been changed in Samung's Kernel code
int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int 
datasync) { struct address_space *mapping = file->f_mapping; int err, ret; 
if (!file->f_op || !file->f_op->fsync) { ret = -EINVAL; goto out; } ret = 
filemap_write_and_wait_range(mapping, start, end); /* * We need to protect 
against concurrent writers, which could cause * livelocks in 
fsync_buffers_list(). */ mutex_lock(&mapping->host->i_mutex); err = 
file->f_op->fsync(file, datasync); if (!ret) ret = err; 
mutex_unlock(&mapping->host->i_mutex); out: return ret; }

Can anyone point out what the additional code is doing and why. (In case 
you have seen this)
Also please suggest any other option to improve MTP write performance

Thanks for your help
Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to