Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp269740rdb; Wed, 20 Dec 2023 11:40:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/h2edMVstBE5REBGEZcgpfE7DAXadZbLgHQbRBNX5NewkvHNQKTzc3U6pCpddQjBRDNaz X-Received: by 2002:a17:907:78c9:b0:a26:86f4:8559 with SMTP id kv9-20020a17090778c900b00a2686f48559mr1456452ejc.45.1703101238315; Wed, 20 Dec 2023 11:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703101238; cv=none; d=google.com; s=arc-20160816; b=j+DJVPJkA+3nNbjpSd+SN7ZOdPr/xKPwYiAs+VaxTzodXT68c7av1AR4DvEKQQGFkC U8rFgTmOM51MrVbUsaG0AH+vd0u6Stody5SYILmdWfRE/8TPsmnE/IojE3ewt9GOtgKp CWFVcm9FBiHaHxFBsQqBMWrBzz48ETIyu/HAO6nqcawEJSR+sl+/J4m5OKusR0s4VQF7 bmt7P2rm8BXHJHsAucr2l8yaIVFYpQ07aktNZkxwufjCAVG3ESH+UblCshcXndlz7Ws1 7O+TlSZGXsUBT38S2a21l741tVC3zLrADmZ5LDGuApmOYQtnJuypK58QYAOkXrA0NwS1 wPiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=uSs9ugn4xX2syOMWcNQR3J7dtI3OSeKcZNKPuVvX3e4=; fh=TYMQPC82ljPToNQyBDrlseu+EpZnNEnN+0t8whQ4wxo=; b=0NX/YQEjFMfhK666/gX8edOY8qCLU06HRFs/D1X6paLpObom/0e8IThSV3dUPmAmAe kBpf1s/Y7QZZA0dkjmwId8iaYEDlmyt/YM7RRipx639725u/wn268Fk07JVniNh387e7 z3vGI04jrCdW2NOBYZKZlZFEaLM6EQQhfV64rnZ664EyRWXZYGnB4SKqsRz9M/zc4kO2 pwqCLiW2wcPxSH7cNHakwJNtEeHdZ1/rOjyPHLTeXxJ2f2rWyEJJ/PRr2zI3RyuOTbq/ qAc82E0tUWd4wZfWTTWqf43in3vIppUWvg/QHYHGem1A++xV8HjLih5uBITQUeserzL9 WjYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="c3l/w81O"; spf=pass (google.com: domain of linux-kernel+bounces-7398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k12-20020a170906128c00b00a2352d34076si127780ejb.470.2023.12.20.11.40.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 11:40:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="c3l/w81O"; spf=pass (google.com: domain of linux-kernel+bounces-7398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 16CE81F2342E for ; Wed, 20 Dec 2023 19:40:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DD91487A7; Wed, 20 Dec 2023 19:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="c3l/w81O" X-Original-To: linux-kernel@vger.kernel.org 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id D2048482F8; Wed, 20 Dec 2023 19:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uSs9ugn4xX2syOMWcNQR3J7dtI3OSeKcZNKPuVvX3e4=; b=c3l/w81OMzy6jVcp2UuJtQ47AU 5qZofDQgBokGRMTk0plHbY9mKYht878jdPOgiQhPZ3A22yZ4qKmtJ6M4PExkDTnMeyi4NOfP8UgbL 5A+jvoS+GNRtZvTTJVuyfNyVJqYXOkB7JZsV9T4S2yW/kiQC6kbEp20sBdtS3reKp137yft3bfuKQ mYrkrz57/+u0eh4y5ezdr60oWaNlJD0IZ49TT2HZx74+XtijHPaOTVAljIDP9nxqFbQy7nDh0P8OQ Usw8gDGJT8VZlomBzwcGXlbfZi1TFrBZF6WOSl+utu3FZdnWeIw3u+tCOFnVbmsubfC9h/d2GsC8y vGQ20Ycw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rG2Qe-000mTL-1b; Wed, 20 Dec 2023 19:40:28 +0000 Date: Wed, 20 Dec 2023 11:40:28 -0800 From: Luis Chamberlain To: deller@kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Arnd Bergmann , linux-modules@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 0/4] Section alignment issues? Message-ID: References: <20231122221814.139916-1-deller@kernel.org> 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: Sender: Luis Chamberlain On Tue, Dec 19, 2023 at 01:26:49PM -0800, Luis Chamberlain wrote: > On Wed, Nov 22, 2023 at 11:18:10PM +0100, deller@kernel.org wrote: > > From: Helge Deller > > My questions: > > - Am I wrong with my analysis? > > This would typically of course depend on the arch, but whether it helps > is what I would like to see with real numbers rather then speculation. > Howeer, I don't expect some of these are hot paths except maybe the > table lookups. So could you look at some perf stat differences > without / with alignment ? Other than bootup live patching would be > a good test case. We have selftest for modules, the script in selftests > tools/testing/selftests/kmod/kmod.sh is pretty aggressive, but the live > patching tests might be better suited. > > > - What does people see on other architectures? > > - Does it make sense to add a compile- and runtime-check, like the patch below, to the kernel? > > The chatty aspects really depend on the above results. > > Aren't there some archs where an unaligned access would actually crash? > Why hasn't that happened? I've gone down through memory lane and we have discussed this before. It would seem this misalignment should not affect performance, and this should not be an issue unless you have a buggy exception hanlder. We actually ran into one before. Please refer to merge commit e74acdf55da6649dd30be5b621a93b71cbe7f3f9 Luis