Received: from eggs.gnu.org ([208.118.235.92]:47720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWeV-0006Va-BJ for qemu-devel@nongnu.org; Tue, 26 Mar 2013 12:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKWeQ-00086a-Jw for qemu-devel@nongnu.org; Tue, 26 Mar 2013 12:23:11 -0400 Received: from mail-bk0-x233.google.com ([2a00:1450:4008:c01::233]:42527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWeQ-00086T-DM for qemu-devel@nongnu.org; Tue, 26 Mar 2013 12:23:06 -0400 Received: by mail-bk0-f51.google.com with SMTP id y8so1181937bkt.24 for ; Tue, 26 Mar 2013 09:23:05 -0700 (PDT) Date: Tue, 26 Mar 2013 17:23:03 +0100 From: Stefan Hajnoczi Message-ID: <20130326162303.GB3391@stefanha-thinkpad.redhat.com> References: <1364294326-22155-1-git-send-email-rjones@redhat.com> <20130326142139.GC26045@rhmail.home.annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130326142139.GC26045@rhmail.home.annexia.org> Subject: Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) block device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org On Tue, Mar 26, 2013 at 02:21:39PM +0000, Richard W.M. Jones wrote: > On Tue, Mar 26, 2013 at 10:38:46AM +0000, Richard W.M. Jones wrote: > > + /* According to the docs, this just updates a field in the > > + * sftp_handle structure, so there is no network traffic and it > > + * cannot fail. > > + */ > > + libssh2_sftp_seek64(s->sftp_handle, offset); > > While I was looking at the performance of qemu+ssh vs sshfs, I noticed > that the line above has a catastrophic effect on performance, since it > causes all readahead data to be thrown away. Ooops. I'm reworking > the patch to make seeking more intelligent. Should libssh2 be smarter and preserve the readahead when offsets are contiguous? It makes sense to fix in QEMU for older libssh2 binaries, but the real fix might be for libssh2 to be smart. Stefan