From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Steve French" Subject: Re: flush and EIO errors when writepages fails Date: Sat, 21 Jun 2008 12:02:31 -0500 Message-ID: <524f69650806211002s3eb211fbs407e18cdb51a94b7@mail.gmail.com> References: <524f69650806201534g67704841u9f942a71b6d9caa3@mail.gmail.com> <20080621070556.GA1155@2ka.mipt.ru> <20080621082742.4b311132@tleilax.poochiereds.net> <20080621131919.GA22509@2ka.mipt.ru> <485D0E76.3020205@austin.rr.com> <20080621144213.GA7971@2ka.mipt.ru> <524f69650806210915j2f62a2e9o3a03c381970a5bce@mail.gmail.com> <20080621162825.GA11100@2ka.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Jeff Layton" , linux-fsdevel , "Shirish Pargaonkar" , "Dave Kleikamp" To: "Evgeniy Polyakov" Return-path: Received: from fk-out-0910.google.com ([209.85.128.187]:39336 "EHLO fk-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbYFURCf (ORCPT ); Sat, 21 Jun 2008 13:02:35 -0400 Received: by fk-out-0910.google.com with SMTP id 18so1688296fkq.5 for ; Sat, 21 Jun 2008 10:02:31 -0700 (PDT) In-Reply-To: <20080621162825.GA11100@2ka.mipt.ru> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Jun 21, 2008 at 11:28 AM, Evgeniy Polyakov wrote: > You can also hack into socket code like tcp_sendmsg()/tcp_sendpage() > (the latter is not used in CIFS though) Your point about tcp_sendpage reminds me of something I have been wondering about for a while. Since SunRPC switched to kernel_sendpage I have been wondering whether that is better or worse than kernel_sendmsg. It looks like in some cases sendpage simply falls back to calling sendmsg with 1 iovec (instead of calling tcp_sendpage which calls do_tcp_sendpages) which would end up being slower than calling sendmsg with a larger iovec as we do in smb_send2 in the write path. For the write case in which we are writing pages (that are aligned) out of the page cache to the socket would sendpage be any faster than sendmsg? (I wish there was a sendmultiple pages call where I could pass the whole list of pages). How should a piece of kernel code check to see if sendpage is supported/faster and when to use kernel_sendpage and when to use sendmsg with the pages in the iovec -- Thanks, Steve