From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34513198851 for ; Mon, 27 Jan 2025 22:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738017252; cv=none; b=okb1u4DaUcMrz3Y8WFBe0ogLk6p7ZgS6M+7LmULKrwfcgCE68XrOuQuo4Vz52og+yg64D+Jd2/qvWIwIcjUntPteZ3RNjmwW1t3xPhb/CWjkyI7cyTaqsxEHFjzU0XPzYzbwhTmBIAp3iBALTEB8BdVsweZnfgp6Z/bYANklbUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738017252; c=relaxed/simple; bh=X+fdaoNWKK19bTid6DEtWhmhH6C4lsqCwHCWOFrdL8k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZMp/DI784VGD3WtTfQZ75xwHBpfOWQFF66fYIFUzQ5JJLFn5DBe18ixrhqr3kGZG+QZUG89eXJnn4xgaQgUuQaTi8SxA5NZjTGfvrQbxGdRWiIa5WBwA7fFgxGj4x080or5JObkfnuUk4VesM8nC7PejrWt55vpBPqQjAeoL/Bg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=HgcRvlDS; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="HgcRvlDS" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2163dc5155fso88994645ad.0 for ; Mon, 27 Jan 2025 14:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1738017250; x=1738622050; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hNUQf/BH62XVFiSZqVQheOvs7cvOxVQxNhdOPTli9YQ=; b=HgcRvlDSy5Sq1egAqRxSAQ1HRFMZtN3aVDsCwpjOkAY/y9XSjqZcrZIwKaqQxjRJ4b dG4/GIBSwE0+xwQDK8oQO7a9HTII02s4ZhC2bGPRx95KtsZbadyu82gja4n3nzxoBjPA MP6sqL+Tq2B8LxpaG3/hNmnlkTSU8UA6/MxPFAAPgaKxlqlqtzF0b8QDuErZfbjQ2ZlD YH/CWMvDmmgYxwWpMmhvw4IeiOPmBs+Gd87BE3aWuzVzZxUHVy+wqj3IfjofiDjl0WN7 BmbGA6wXfGiQHGZkTRYhgAqzlEohhmXJsUyUlc8ulIgS5lwMu4hfsE+fUdm0MrbQ3/xc Og/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738017250; x=1738622050; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hNUQf/BH62XVFiSZqVQheOvs7cvOxVQxNhdOPTli9YQ=; b=LXLY85MXK7iQHeNIStKVg+rnxijp0kVz0w0jQ+/MKZJ153JaxBBuSn5elSQykfee2X 5p5irqb1y2PI8/OeYTZZELHYaWce+ErsE3+E1dukBby0FriYlWmhGZWIXiN4+qcsPiT2 3zDJMrHZz0iHCjyC9O1pUElAPy1arPO2007pFsU2Tm3yaQDAMEgcpMVa2kFGKunVlcC5 UzPx5PEy0L1pGfuJldYCL2ijvyc+lfQ5+PjRIrKkLXsZfncINamFzNOcDT6E+NrBL8Z6 FsH9vJI368QX7KiTYGYDUhtHC5+kJkaE07wL5i2qaVWtvlyVeNUS5+O41SXnpRJ8muWN HwQg== X-Forwarded-Encrypted: i=1; AJvYcCWHD8oq3/wPMlhcc06uB5FRkolGhhdXTQIU2CLny/BXnQGlfNVJd66O6UKUXSu0HYpWMRuD0fSvAJGE8WU=@vger.kernel.org X-Gm-Message-State: AOJu0YwSBGj5nBS4pQm4hHmzQCvVNZy83XWU3gmW0UFrIhrAEk43lGkf vuoGkL03ValTkR4oURVWLeKiOrdaPsGS5v6spegu+a5Jnu8bd2ZEpVhspFNB/pc= X-Gm-Gg: ASbGnct9oAxm1L3bXT+GoHV6XwKVJDbuRK51r1SKu2kjFNIxz3TTnGbXDz2yR1C4Osk xj0kB5ZzTr3YIgeoSOIo8D1jXhKGO6xoI9aKhHtzx11SWWAOWIcudpSZJpf5DBYuColsrsjdODt oR6TYb0EJys4JHe6Vef/kdbs7jKrhbm3zlNOZ7ow6xgT2Z2DUwLoOxl6Fm89GY6DoUPhVwVT0Rj 6WjzLUPZHarXIAiyGKzI8i5QctlGksqft+pp2VBpVanvnkczV38+mTC3JUKr1UxlbVsJAo= X-Google-Smtp-Source: AGHT+IG1PsIZ6jEY35m/19n24um/49j+2QwIysUJvG8QmgPY/IM3AWJfA7DedGeF/WQstxSfxXf+TA== X-Received: by 2002:a17:903:320e:b0:217:9172:2ce1 with SMTP id d9443c01a7336-21c35544407mr700049175ad.22.1738017250514; Mon, 27 Jan 2025 14:34:10 -0800 (PST) Received: from ghost ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da3ea3bb9sm69323645ad.92.2025.01.27.14.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 14:34:09 -0800 (PST) Date: Mon, 27 Jan 2025 14:34:07 -0800 From: Charlie Jenkins To: Paul Menzel Cc: Chunyan Zhang , Paul Walmsley , Palmer Dabbelt , Albert Ou , Song Liu , Yu Kuai , linux-riscv@lists.infradead.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, Chunyan Zhang Subject: Re: [PATCH V2] raid6: Add RISC-V SIMD syndrome and recovery calculations Message-ID: References: <20250127061529.2437012-1-zhangchunyan@iscas.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jan 27, 2025 at 09:39:11AM +0100, Paul Menzel wrote: > Dear Chunyan, > > > Thank you for the patch. > > > Am 27.01.25 um 07:15 schrieb Chunyan Zhang: > > The assembly is originally based on the ARM NEON and int.uc, but uses > > RISC-V vector instructions to implement the RAID6 syndrome and > > recovery calculations. > > > > Results on QEMU running with the option "-icount shift=0": > > > > raid6: rvvx1 gen() 1008 MB/s > > raid6: rvvx2 gen() 1395 MB/s > > raid6: rvvx4 gen() 1584 MB/s > > raid6: rvvx8 gen() 1694 MB/s > > raid6: int64x8 gen() 113 MB/s > > raid6: int64x4 gen() 116 MB/s > > raid6: int64x2 gen() 272 MB/s > > raid6: int64x1 gen() 229 MB/s > > raid6: using algorithm rvvx8 gen() 1694 MB/s > > raid6: .... xor() 1000 MB/s, rmw enabled > > raid6: using rvv recovery algorithm > > How did you start QEMU and on what host did you run it? Does it change > between runs? (For me these benchmark values were very unreliable in the > past on x86 hardware.) I reported dramatic gains on vector as well in this response [1]. Note that these gains are only present when using the QEMU option "-icount shift=0" vector becomes dramatically more performant. Without this option we do not see a performance gain on QEMU. However riscv vector is known to not be less optimized on QEMU so having vector be less performant on some QEMU configurations is not necessarily representative of hardware implementations. My full qemu command is (running on x86 host): qemu-system-riscv64 -nographic -m 1G -machine virt -smp 1\ -kernel arch/riscv/boot/Image \ -append "root=/dev/vda rw earlycon console=ttyS0" \ -drive file=rootfs.ext2,format=raw,id=hd0,if=none \ -bios default -cpu rv64,v=true,vlen=256,vext_spec=v1.0 \ -device virtio-blk-device,drive=hd0 This is with version 9.2.0. I am also facing this issue when executing this: raid6: rvvx1 gen() 717 MB/s raid6: rvvx2 gen() 734 MB/s Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 Only rvvx4 is failing. I applied this patch to 6.13. - Charlie