From owner-freebsd-embedded@FreeBSD.ORG Mon Jun 23 22:44:29 2014 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7AF7C75; Mon, 23 Jun 2014 22:44:29 +0000 (UTC) Received: from mail-we0-x235.google.com (mail-we0-x235.google.com [IPv6:2a00:1450:400c:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A05E2DAE; Mon, 23 Jun 2014 22:44:29 +0000 (UTC) Received: by mail-we0-f181.google.com with SMTP id q59so7751174wes.40 for ; Mon, 23 Jun 2014 15:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2PzU+UREL0fw6riva/9Ox7FINRm8T6mQLb2BoVjwLRY=; b=OAPtKOmpHPOEiaaa5bbsGQMP/iznyP2JsRIkEgOA9aTYGTPYTQCx0EgqlhFvcF/bX1 GMfJSWFvZ+kBirnelVg1f1yN+bPoJeg4j0QUpEbL8jCjWgz2EcSfvEvRl27T/bXNpwbf U0bgWRQRV1h6bs81R3ijn4Df8aBfdX2b1txPWiFwSYq1HInR23rs4tEbv3xfvKU+CJ2A BdvGAIfYhfIwY8YHRGAImV3cjK+fxb5A2G0kw59gRcrc38Zi+1dcDJG7Nt1/7UqhMBxH 3rFBvfF93/zLK6UQ2MRJDk31JzxuSLY7QoUbhT0/q4L7rAdAKc5vksQnqdHuKF0mIpsf 1wiw== MIME-Version: 1.0 X-Received: by 10.194.92.177 with SMTP id cn17mr18585857wjb.71.1403563467495; Mon, 23 Jun 2014 15:44:27 -0700 (PDT) Received: by 10.216.23.1 with HTTP; Mon, 23 Jun 2014 15:44:27 -0700 (PDT) In-Reply-To: <20140621140300.GO31367@funkthat.com> References: <1403193531.20883.269.camel@revolution.hippie.lan> <20140621140300.GO31367@funkthat.com> Date: Tue, 24 Jun 2014 00:44:27 +0200 Message-ID: Subject: Re: Strange slowdown of zlib. From: Magnus Nilsson To: John-Mark Gurney , freebsd-embedded@freebsd.org, freebsd-arm Content-Type: text/plain; charset=UTF-8 Cc: Ian Lepore X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 22:44:30 -0000 On Sat, Jun 21, 2014 at 4:03 PM, John-Mark Gurney wrote: > Magnus Nilsson wrote this message on Sat, Jun 21, 2014 at 14:13 +0200: >> While e.g. cat or md5 of an executable affects its speed, e.g. cp does not. >> Could there be some read access that's unaffected by your patches? > > I believe that cp uses mmap instead of the read syscall like cat and > md5... So this may be the case... > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." mmap() seems unaffected, well spotted. Not sure if it would be reasonable to use that fact for a workaround? I've done more patching and testing. Mark Tinguely's conservative, unofficial patch http://lists.freebsd.org/pipermail/freebsd-arm/2010-November/002635.html does not fix the issue. Grzegorz Bernacki's proof-of-concept patch http://lists.freebsd.org/pipermail/freebsd-arm/2010-March/002270.html /does/ fix the issue! But what's the potential downside? Debugging issues, as suggested in http://lists.freebsd.org/pipermail/freebsd-arm/2010-March/002290.html ? Performance issues? Something worse? I've looked at later releases (9.3) for backporting, but can't find anything that that handles PVF_EXEC as a special case like Mark and Grzegorz.