All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Nathan Chancellor' <nathan@kernel.org>, Jian Cai <jiancai@google.com>
Cc: "cjdb@google.com" <cjdb@google.com>,
	"manojgupta@google.com" <manojgupta@google.com>,
	"llozano@google.com" <llozano@google.com>,
	"clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>,
	Guenter Roeck <linux@roeck-us.net>, Jens Axboe <axboe@kernel.dk>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] blk-mq: fix alignment mismatch.
Date: Wed, 31 Mar 2021 10:38:15 +0000	[thread overview]
Message-ID: <553e40c54eea408a96f42eec53616993@AcuMS.aculab.com> (raw)
In-Reply-To: <20210330232946.m5p7426macyjduzm@archlinux-ax161>

From: Nathan Chancellor
> Sent: 31 March 2021 00:30
> 
> Hi Jian,
> 
> On Tue, Mar 30, 2021 at 04:02:49PM -0700, Jian Cai wrote:
> > This fixes the mismatch of alignments between csd and its use as an
> > argument to smp_call_function_single_async, which causes build failure
> > when -Walign-mismatch in Clang is used.
> >
> > Link:
> > http://crrev.com/c/1193732
> >
> > Suggested-by: Guenter Roeck <linux@roeck-us.net>
> > Signed-off-by: Jian Cai <jiancai@google.com>
> 
> Thanks for the patch. This is effectively a revert of commit
> 4ccafe032005 ("block: unalign call_single_data in struct request"),
> which I had brought up in this thread:
> 
> https://lore.kernel.org/r/20210310182307.zzcbi5w5jrmveld4@archlinux-ax161/
> 
> This is obviously a correct fix, I am not just sure what the impact to
> 'struct request' will be.

If the structure is allocated on-stack then aligning it
requires the compiler generate the rather horrid
'double stack frame' for the function.

Possibly the unaligned 'struct' should be used by all
the code except for a few places where it makes sense
to allocate an aligned item?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


      parent reply	other threads:[~2021-03-31 10:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 23:02 [PATCH] blk-mq: fix alignment mismatch Jian Cai
2021-03-30 23:12 ` Guenter Roeck
2021-03-30 23:29 ` Nathan Chancellor
2021-03-31  0:26   ` Guenter Roeck
2021-03-31  1:31     ` Jian Cai
2021-03-31 21:27       ` Jian Cai
2021-03-31 21:58         ` Nathan Chancellor
2021-03-31 22:06           ` Nick Desaulniers
2021-04-08 17:57             ` Jian Cai
2021-04-08 18:12               ` Nathan Chancellor
2021-04-08 18:42                 ` Jian Cai
2021-04-08 19:44                 ` [PATCH] block: Disable -Walign-mismatch for blk-mq.c Nathan Chancellor
2021-04-08 19:52                   ` Guenter Roeck
2021-03-31 10:38   ` David Laight [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=553e40c54eea408a96f42eec53616993@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=axboe@kernel.dk \
    --cc=cjdb@google.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jiancai@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=llozano@google.com \
    --cc=manojgupta@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.