Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15889564rwd; Mon, 26 Jun 2023 02:48:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CXr9+gEIf1S+uACUmkokpAGdAlnFuBxg5WswaeMZTjYtBJCiFwUGTcVTi2xgmwkmOUVSD X-Received: by 2002:a05:6a21:328d:b0:126:4aa9:8d4 with SMTP id yt13-20020a056a21328d00b001264aa908d4mr3767120pzb.44.1687772886899; Mon, 26 Jun 2023 02:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687772886; cv=none; d=google.com; s=arc-20160816; b=uu86zHMh+k9c27LJA22AwDpWn3pBGRnLoSR5kAl/VYiXpIA3SiJF4EGbKWlqZcIBM8 g+SFr6O4c7FOOUCM1kcxAcTOWckP+PcfMsNqvTKEkBS0oTqnWDbTIZzcrE7mWFsOlt12 vxpUOdVX5vJD3RsAl8BNLBLL7b7YjPtrxPjDvaWfAxwH5EQNV88AmdtJM3I9+lOY6gSx hg/EYW2WnDFW/BDoorWf52KkL0KK3juV7LLMw6a6rBIfsrcQ4Vl43HuJ2dAxzBBFP3nR NVYz8mlSIIOKjTm7jvAH0VQnnE3GJ+SQzmywNhR1J9KGmcovF6dUjnVscdrsJaGLcAMQ n9aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=BAHJeT7pprM9BOrFSEPCNvq9rHVcFPvY04LTzXMC1iU=; fh=23CoB8gFLhC9oc6SIf9IVwCQdayZnl2N04Qc5djN/Vk=; b=czdvmi5WifHcz9pPF7n65OB802XlOcQvZr5G0tlM+la8EUtXTr2litAQl0ftpEJPOk 08xP1V8HrAymhwJYnAtY5YcBvLFWcitjXTZhPDWm74VrNgHH6/o4llDcXlsgc+FKXzWU c2dTajpUmDjAG8SITuNygpthUTM/MQFFVCHpRpDrXORiBjK1XftSAgkltMkrLUPnrdD2 v43HeGSr5K6Kxu8gSPOuwyqoNMSkEPzG7HtZI0cQWN2O1C29nHEA95X9lIQOUhIWR43c 0M0OouLaobMcbE9z5KmNy5y/hn/OGyisnmr1hRglfe+Ye17B8uG4v+5ya9KqCxFyKlBy /uaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a170903228200b001b8094ab0b7si1238441plh.449.2023.06.26.02.47.55; Mon, 26 Jun 2023 02:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbjFZJ1l convert rfc822-to-8bit (ORCPT + 99 others); Mon, 26 Jun 2023 05:27:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbjFZJ1R (ORCPT ); Mon, 26 Jun 2023 05:27:17 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58CB0173C for ; Mon, 26 Jun 2023 02:24:41 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-254-bXN7M5eWPfeft9XssNQwlg-1; Mon, 26 Jun 2023 10:24:38 +0100 X-MC-Unique: bXN7M5eWPfeft9XssNQwlg-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 26 Jun 2023 10:24:36 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Mon, 26 Jun 2023 10:24:36 +0100 From: David Laight To: 'Yangyu Chen' , "evan@rivosinc.com" CC: "ajones@ventanamicro.com" , "alexghiti@rivosinc.com" , "andy.chiu@sifive.com" , "aou@eecs.berkeley.edu" , "apatel@ventanamicro.com" , "conor.dooley@microchip.com" , "corbet@lwn.net" , "greentime.hu@sifive.com" , "guoren@kernel.org" , "heiko.stuebner@vrull.eu" , "heiko@sntech.de" , "jeeheng.sia@starfivetech.com" , "jszhang@kernel.org" , "leyfoon.tan@starfivetech.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "lizhengyu3@huawei.com" , "masahiroy@kernel.org" , "palmer@dabbelt.com" , "palmer@rivosinc.com" , "paul.walmsley@sifive.com" , "rdunlap@infradead.org" , "samuel@sholland.org" , "shosie@rivosinc.com" , "sunilvl@ventanamicro.com" , "xianting.tian@linux.alibaba.com" Subject: RE: [PATCH 0/2] RISC-V: Probe for misaligned access speed Thread-Topic: [PATCH 0/2] RISC-V: Probe for misaligned access speed Thread-Index: AQHZpoXPPuZN4PqkvUikwrb+zgw4aa+c0l/Q Date: Mon, 26 Jun 2023 09:24:36 +0000 Message-ID: <253bad9e83cd4890b29dd89a3d5a1937@AcuMS.aculab.com> References: <20230623222016.3742145-1-evan@rivosinc.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yangyu Chen > Sent: 24 June 2023 11:22 > > Hi, > > Thanks for doing this. > > On 6/24/23 6:20 AM, Evan Green wrote: > > I don't have a machine where misaligned accesses are slow, but I'd be > > interested to see the results of booting this series if someone did. > > I have tested your patches on a 100MHz BigCore rocket-chip with opensbi running on FPGA with > 72bit(64bit+ECC) DDR3 1600MHz memory. As the rocket-chip did not support misaligned memory access, > every misaligned memory access will trap and emulated by SBI. > > Here is the result: ... > ~ # dmesg | grep Unaligned > [ 0.210140] cpu1: Unaligned word copy 0 MB/s, byte copy 38 MB/s, misaligned accesses are slow > [ 0.410715] cpu0: Unaligned word copy 0 MB/s, byte copy 35 MB/s, misaligned accesses are slow How many misaligned cycles are in the test loop? If emulated ones are that slow you pretty much only need to test one. Also it is pretty clear that you really don't want to be emulating them. If the emulation is hidden from the kernel that really doesn't help at all. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)