From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27072 invoked by alias); 21 Aug 2015 09:34:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27062 invoked by uid 89); 21 Aug 2015 09:34:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 21 Aug 2015 09:34:38 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 81AD8220; Fri, 21 Aug 2015 09:34:36 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7L9YWEV029637; Fri, 21 Aug 2015 05:34:33 -0400 Message-ID: <55D6F0A8.40701@redhat.com> Date: Fri, 21 Aug 2015 09:34:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Gary Benson CC: Sandra Loosemore , Joel Brobecker , Doug Evans , Jan Kratochvil , gdb-patches , =?windows-1252?Q?Andr=E9_P=F6nitz?= , Paul Koning Subject: [pushed] Add readahead cache to gdb's vFile:pread (Re: [PATCH 0/2] Better handling of slow remote transfers) References: <20150814182648.GO22245@adacore.com> <55CE6AA3.8000300@codesourcery.com> <20150816184913.GA2998@adacore.com> <20150817085310.GC25320@blade.nx> <55D1EE96.9060202@codesourcery.com> <20150818095858.GB9815@blade.nx> <55D3625B.40101@codesourcery.com> <55D3DB83.4050204@redhat.com> <20150819134242.GA18586@blade.nx> <55D5E84E.5060303@redhat.com> <20150820180122.GA15604@blade.nx> In-Reply-To: <20150820180122.GA15604@blade.nx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-08/txt/msg00565.txt.bz2 On 08/20/2015 07:01 PM, Gary Benson wrote: > Pedro Alves wrote: >> Hey, that was a quick and dirty patch. :-) > > I know, no worries :) > >> Here's a cleaned up version. WDYT? > [snip >> This patch almost halves the time it takes to "target remote + run >> to main" on a higher-latency connection. >> >> E.g., I've got a ping time of ~85ms to an x86-64 machine on the gcc >> compile farm (almost 2000km away from me), and I'm behind a ~16Mbit >> ADSL. When I connect to a gdbserver debugging itself on that machine >> and run to main, it takes almost 55 seconds: > [snip] >> real 0m54.803s >> user 0m0.329s >> sys 0m0.064s >> >> While the readahead cache added by this patch, it drops to: >> >> real 0m29.462s >> user 0m0.454s >> sys 0m0.054s >> >> I added a few counters to show cache hit/miss, and got: >> >> readahead cache miss 142 >> readahead cache hit 310 >> >> Tested on x86_64 Fedora 20. > > Very nice, please commit! Pushed, master and 7.10. Thanks, Pedro Alves