From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAC9BC2B9F4 for ; Tue, 15 Jun 2021 02:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87EDE61405 for ; Tue, 15 Jun 2021 02:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbhFOCpl (ORCPT ); Mon, 14 Jun 2021 22:45:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbhFOCpe (ORCPT ); Mon, 14 Jun 2021 22:45:34 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85B08C061574; Mon, 14 Jun 2021 19:43:30 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id i4so18366205ybe.2; Mon, 14 Jun 2021 19:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2z/FB/rbjsEGSE0I/ycIJryY05UbKzaovsaCJYEhAYk=; b=Sua5NxWx9NLlw/uglvDupK+TSkyTwadFlrZQ+x3SIb39Hvz120OaazzzCVuvxdjw/t JKF9rO/R4Qm5k/U9gBP+voLPLvHqGNv5LrDBA/0zOSP3Q5QmuksjkyF9ALJWHYelVvA7 kGwR62diNY/EoCPAhvSkK60p9xnFm8FwYg6HfWZ75K+xzXaktYtg92oIER1ZSVt6ahGT jARBrVJb0WEaq8/1id1Gd5/p4uc6JWNcxmZBnO9RUSep8OusseUgFi2pksJ7kajcAWzk GNHLwzJp4WFS6izYlKl9JpnHaH6RgmYtRscuZTcK8liDnjfcysF9iW5Cm3+txcWOkC/L UCGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2z/FB/rbjsEGSE0I/ycIJryY05UbKzaovsaCJYEhAYk=; b=rr/wTlg8LMZ32i9+les26RyuIfoWkDxJmZLZBDhPrBKcz62F0yfyrPXddtda54gnyD eDr7T9JLocvfg7IhQ2tZ1JFjRh5HvesO57U5jh1666NvoYqCRgaR3DBixiOPqd3CvHEv P+6qJZJy/L2M1cIEspqFhJZXX+OblTSSLvfrppeZkKKdSBO2PqMowCZPGyMHEEN+KHBC GCEFiMp7QuLCzWsBSNAV+cmOf6+R0rZrHrxbF5Uw7xcBJCtY6j29dDfTp0Ug4AAA8xTt Lppgv3AUsPzDbxHKu2+5dSzxM3nAwZBHXc6y6ikW6A5bYEeg/E8dndm2Zy49iK9d208u X48g== X-Gm-Message-State: AOAM533F8x6JYMCp2CaEduyQjf+7SWqaXZx9b5U0oSYHwGRKfrrGcCft OAE52ecW5WN98Cr39SZoOIj7MRNlvl5sxFkLmbE= X-Google-Smtp-Source: ABdhPJzeGuVkNdlonyK7Ip83AfkYuFQIGhXU4TjGQku/wU6+LaH/EGJEITgUSEDaUojptNwY4Xcfvk3Tx/0rAb1byEg= X-Received: by 2002:a25:be09:: with SMTP id h9mr30040462ybk.239.1623725009832; Mon, 14 Jun 2021 19:43:29 -0700 (PDT) MIME-Version: 1.0 References: <20210615023812.50885-1-mcroce@linux.microsoft.com> In-Reply-To: <20210615023812.50885-1-mcroce@linux.microsoft.com> From: Bin Meng Date: Tue, 15 Jun 2021 10:43:18 +0800 Message-ID: Subject: Re: [PATCH 0/3] riscv: optimized mem* functions To: Matteo Croce Cc: linux-riscv , linux-kernel , linux-arch@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Emil Renner Berthing , Akira Tsukamoto , Drew Fustini Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matteo, On Tue, Jun 15, 2021 at 10:39 AM Matteo Croce wrote: > > From: Matteo Croce > > Replace the assembly mem{cpy,move,set} with C equivalent. > > Try to access RAM with the largest bit width possible, but without > doing unaligned accesses. > > Tested on a BeagleV Starlight with a SiFive U74 core, where the > improvement is noticeable. > There is already a patch on the ML for optimizing the assembly version. https://patchwork.kernel.org/project/linux-riscv/patch/20210216225555.4976-1-gary@garyguo.net/ Would you please try that and compare the results? Regards, Bin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA1FBC48BDF for ; Tue, 15 Jun 2021 18:29:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F73E60FF0 for ; Tue, 15 Jun 2021 18:29:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F73E60FF0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v//kn96NGqABAYoj904T7O16eWPyuNBcAYMGzE393i4=; b=0C0yiNVkVDwmwt 7eOyHfd771xz3FZUVDoobG/ILtyzImfkGAfzAPpIF6Fq9sX7F17b2CooNefarW8p1KHWFqJ6mBrVG 0hGE47SAzW3XLrjfJaOay1N8MWkesd7S5mIaRlgJ0MgJ/h0NEeGut30ADGQbuoC2gdnWPC+trvBbR RZmUFmsnCknhq9UIC8IyTt3ZTt7eS5+czsj45PswmumHK7eDTLtEnR366jNHS1xK8RXLngE2PFyIo ruWWy0Vau9yHpMgLv9/k3TllKVt3CGy85EM1WX8KzftTCshBn1OqL4IU3bVTXQZ5lkouTwFA3iBw8 oaZW4PGjXVTciZ6RuBpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltDof-0027RV-AC; Tue, 15 Jun 2021 18:29:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt9Pa-000DDm-O0 for linux-riscv@bombadil.infradead.org; Tue, 15 Jun 2021 13:47:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2z/FB/rbjsEGSE0I/ycIJryY05UbKzaovsaCJYEhAYk=; b=fkXl1ZUNZin1oWxIifobk0XZ1l oRfmqfxHPnKeBSetG0be5PFYN6WRHhPGAV53EYNogIseRgbVcciS6ZZn0CVl4nk7cFvMFCwaXhLgv CTRGIWswOUKG5kpqPEg35VYii43yOLHSOnxFl+HxPg5kMUDRqoMpUk3RG78qCdG8Vf1/gtEWO+u4L 871eOkMgL5bLCGMpDPY8VDWDQ4K6ohw35vceXTeE967FgTC74ojR4SMCIRSt5yF5OF9EDxcbr5QSV MAcobDilJFjQx01x4HmYYMBhfk1zIuLZtvQwYUJMtRvqe08e2rNZKGmS5N1ubay8UUhxi3x8959U8 DoliaoHw==; Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsz2z-007H3l-ND for linux-riscv@lists.infradead.org; Tue, 15 Jun 2021 02:43:34 +0000 Received: by mail-yb1-xb30.google.com with SMTP id c14so18340723ybk.3 for ; Mon, 14 Jun 2021 19:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2z/FB/rbjsEGSE0I/ycIJryY05UbKzaovsaCJYEhAYk=; b=Sua5NxWx9NLlw/uglvDupK+TSkyTwadFlrZQ+x3SIb39Hvz120OaazzzCVuvxdjw/t JKF9rO/R4Qm5k/U9gBP+voLPLvHqGNv5LrDBA/0zOSP3Q5QmuksjkyF9ALJWHYelVvA7 kGwR62diNY/EoCPAhvSkK60p9xnFm8FwYg6HfWZ75K+xzXaktYtg92oIER1ZSVt6ahGT jARBrVJb0WEaq8/1id1Gd5/p4uc6JWNcxmZBnO9RUSep8OusseUgFi2pksJ7kajcAWzk GNHLwzJp4WFS6izYlKl9JpnHaH6RgmYtRscuZTcK8liDnjfcysF9iW5Cm3+txcWOkC/L UCGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2z/FB/rbjsEGSE0I/ycIJryY05UbKzaovsaCJYEhAYk=; b=M5m4hCt0z/H9z4/rXOWuvWW+jzfWYSQDcQiqWiIcdydn2gG2LqxJ6EAfx+VcWmmS9l c5xr7x5uTUD1M5DhlPEIx9yCOh7ULEyYAqZ8mqaVUIvSHEH1Zf27GovgoGguNcYDAO4I iiQZJ0u4NRFTDz+gFLODeSgtqJOKgkdoLUCHo/jrbJ/bPSJ9svhyWar1tM/KPuggRB5b 9CnfahRALDjDZDKNO1of/GSGZrPHZe903iJuaKepbIVVzCP6tFihTzaSrEW7/JF9yqEJ 9KJsIq6BOK60AHSyIYhMqm1C/052Ued3TkQnxI3Kbl+rz6jccTUAtbZ3c0NApGEu/PXl 2qMQ== X-Gm-Message-State: AOAM5331oySBbTjndKsjTgtoUX9DoqfRyzKyiRoy7JdpdGkDebnZ6RFu U+hHYrUjjNoKdDizWWcQ8lEXS99zeddtbTc1sKo= X-Google-Smtp-Source: ABdhPJzeGuVkNdlonyK7Ip83AfkYuFQIGhXU4TjGQku/wU6+LaH/EGJEITgUSEDaUojptNwY4Xcfvk3Tx/0rAb1byEg= X-Received: by 2002:a25:be09:: with SMTP id h9mr30040462ybk.239.1623725009832; Mon, 14 Jun 2021 19:43:29 -0700 (PDT) MIME-Version: 1.0 References: <20210615023812.50885-1-mcroce@linux.microsoft.com> In-Reply-To: <20210615023812.50885-1-mcroce@linux.microsoft.com> From: Bin Meng Date: Tue, 15 Jun 2021 10:43:18 +0800 Message-ID: Subject: Re: [PATCH 0/3] riscv: optimized mem* functions To: Matteo Croce Cc: linux-riscv , linux-kernel , linux-arch@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Emil Renner Berthing , Akira Tsukamoto , Drew Fustini X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_034332_713558_3DECC934 X-CRM114-Status: GOOD ( 10.58 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hi Matteo, On Tue, Jun 15, 2021 at 10:39 AM Matteo Croce wrote: > > From: Matteo Croce > > Replace the assembly mem{cpy,move,set} with C equivalent. > > Try to access RAM with the largest bit width possible, but without > doing unaligned accesses. > > Tested on a BeagleV Starlight with a SiFive U74 core, where the > improvement is noticeable. > There is already a patch on the ML for optimizing the assembly version. https://patchwork.kernel.org/project/linux-riscv/patch/20210216225555.4976-1-gary@garyguo.net/ Would you please try that and compare the results? Regards, Bin _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv