From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 D14C42566 for ; Sun, 14 Sep 2025 14:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757859278; cv=none; b=jX7rCuG5Vme+/V1wH2w1Hd5EtW82LcGCxEQi4iPE2VJFJDIYqdkQU6u+U3kHSJ5FsiPZ0A8+Radzid8IJBhGwngnMFCremg2jA0/FpZ5hptF1Q3NaUfdQX+SDiLCMblKgg1mABWM/6W/efF+W9/3XUZ6qIc94xRXQeTqKJ+9pxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757859278; c=relaxed/simple; bh=Rsmnz5ehwwD+e6s8Ghc2gnO/lAjHc9SnHOnInCxPlik=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a5SVMyxu9GryFdj2e287XPx8BcCYFg9dt/0ZKNJwTVk/FWwk0sHTl1QXLiNgfM65YNmsFrfVusLl4RMdWY4Hp73a0tLsBuqgvOeN+hyr0MxpolunYPV+3tVw+Ue25agXvqyxXzP4vzLGxSpi+VKe5aa2uvkahU+b+helIN0/GYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=D0A+U3le; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="D0A+U3le" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-45ed646b656so25072655e9.3 for ; Sun, 14 Sep 2025 07:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1757859275; x=1758464075; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Y3F3gHFDQFzacuixXPNxgyiyL3e3GDIcaWU8k6+Yt7M=; b=D0A+U3leXpjzQQ6KyZ+NPadCZWfX/C5OkWDBkd9fAe1G1cUVbgkL7ZicXA1c6hRwuO VMyDsIgH1jWvzfcePD7WGeMzns3mzWE+MMBLFNLFht4F+MOtWy4NhCkA3OP6zDooLspl iGAJkAZFL5uQ0tR67gUGIYiLNA/vlMuLMRl1Zdv8GSdbzWJpu/f0rRsVVbtxZt+4qoie T3KWzDXxxf9kqnJZpV4TaX9UK5BDXKPBYxHoI03a+4PWsgZNpb1xe+J7pSJJ65au4BXk JQm+OMEyoPZg3KNHJDCV+hr+rzRv4z8TJ36SLsbJFRPSqwdQ0WVU+hN/wtjBYMY8Gh0C elWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757859275; x=1758464075; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y3F3gHFDQFzacuixXPNxgyiyL3e3GDIcaWU8k6+Yt7M=; b=EmxEoQjK0RQE0tJaiqc91pXOyxJX8ltNNQBjuf3WUphFH2pqG8lmo0O/t2KuOM+Sd9 mW66JVQDO8CjFM64MG5IujdVRz5jpXSPOjUkYacO4VK8Os12L7OU24JTCkUmCiiuLFDt 6LFLkmeez2+dQgOEtGJCaNPYYRofoGyGCcijAROsp0n/w8Oq90Al2vTpxXiUqnc8c0Vx E9TZPfzsjcPesK3ELsjPxEs/WSBzEni1BxYCkCTiHia0llTEHKLNwdxNOJhGnQOf9QTz ekkoFAbioTBxIW6OgPriZGxo2yAtzbQ+X3F086dO4TFi86UBcED07UtLs7uvTSzQRMfT e9Ag== X-Gm-Message-State: AOJu0Yw5NavEzXGWDesHMVHgOMnQOpQteV4E3YD92oDmThKsi4ZSKNYp RcRgHWyWqtvIfPNEkaoWT034m900gaPzuog8wE5O0O7NNJ7XC5PgORtMVL3ht64o6g== X-Gm-Gg: ASbGncuar1BV3Wr57XqO1Ha/vb6+3Yyw7dEIRUhRPmP6M2LhLVSAH02V0HahNd094Ie 253RnEF+PXNyjQANbleMkP9Fc5H+STzaNEj5xOfjG+PuaNmkFRV3d2gk5z202XjmdCayc3O9LuS SiJOiWRcNLcsEDcJ4w0MtSwsvROXDfjWQMXlvqXJrlBsYABK8RqGmtWi9vu4YRap2icCvpDfmb0 BaZjyiMxgBcMzMD/XHzoHwlpHWKSKtKWtpEspWtlIt8ULTXuKvZNvh5ENt22pKg2Md8Lm9LaTsR V6C4DxmjJY4Ckxep9wZe6fnkLox7l/aTA4QcYK7wHAUFCVF4dk1r5o9dvlx5BjBLLJ1rVrtzT7/ XzV9Yrc/rS0rr1neVG3Kiq7jWqzRi7oRtNBxrhM3GIners1CAVHTn X-Google-Smtp-Source: AGHT+IGQriZidF0ofa5giYiaEWj1yh444RppyP/jSUthWCGs5bua9rVBk9KXXj1F5G1ILnTwzibAdg== X-Received: by 2002:a05:6000:40da:b0:3e7:6444:6f9 with SMTP id ffacd0b85a97d-3e765782abemr7015938f8f.7.1757859275066; Sun, 14 Sep 2025 07:14:35 -0700 (PDT) Received: from [172.20.3.155] ([12.157.112.82]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2631e29e60fsm29706085ad.137.2025.09.14.07.14.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Sep 2025 07:14:34 -0700 (PDT) Message-ID: <9d104c46-855c-4b36-8226-1f59b59e455c@suse.com> Date: Sun, 14 Sep 2025 16:14:33 +0200 Precedence: bulk X-Mailing-List: linux-toolchains@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Unaligned access trade-offs for SFrame FRE layout To: Indu Bhagat Cc: "linux-toolchains@vger.kernel.org" , Jens Remus , Sterling Augustine , Pavel Labath , Andrii Nakryiko , Josh Poimboeuf , Steven Rostedt , Serhei Makarov , Binutils References: Content-Language: en-US From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12.09.2025 19:34, Indu Bhagat via Binutils wrote: > TL;DR: Thinking and experimenting a bit on the possible approaches for > avoiding unaligned accesses in the SFrame FRE layout (in SFrame V3), I > am not convinced that avoiding unaligned accesses for performance is > worth it. IMO, forsaking compactness for avoiding unaligned accesses is > not a good trade off for SFrame. > > Problem Statement > On architectures such as x86_64, AArch64, and s390x, unaligned memory > accesses are handled transparently by the hardware but incur a > performance penalty. As you say in a reply, may incur. However, shouldn't we also consider possible ports of SFrame to architectures which don't handle this as transparently? Off the top of my head I don't, for example, recall whether RISC-V requires unaligned accesses to be handled transparently by the hardware. Jan