All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matias Bjørling" <m@bjorling.me>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-block@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jens Axboe <axboe@fb.com>
Subject: Re: [PATCH] lightnvm: change max_phys_sect to ushort
Date: Thu, 12 Nov 2015 20:05:25 +0100	[thread overview]
Message-ID: <5644E2F5.707@bjorling.me> (raw)
In-Reply-To: <CA+55aFzOjk901JZ2RVHshwK-2UEwXi9BY7fygJxCeQmWV=ffYQ@mail.gmail.com>

On 11/12/2015 08:02 PM, Linus Torvalds wrote:
> On Thu, Nov 12, 2015 at 10:57 AM, Matias Bjørling <m@bjorling.me> wrote:
>>
>> Grah, I need to be more careful. I sent the wrong patch after I had fixed it
>> to unsigned short.
>
> Actually, I think "unsigned int" was better.
>
> You're not saving any space with "unsigned short" (the size of the
> structure will be rounded up to the alignment of it anyway), and we
> should generally strive to avoid 16-bit accesses unless there is some
> real reason for them, because they are often slower than either "char"
> or "int". Several architectures have weak support for 16-bit accesses
> (eg alpha), and even on x86 you end up having operand size overrides
> etc.
>

Thanks

> So unless there is a clear *reason* to use "short" - just don't.
>
>                     Linus
>


  reply	other threads:[~2015-11-12 19:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 18:35 [PATCH] lightnvm: change max_phys_sect to ushort Matias Bjørling
2015-11-12 18:42 ` Geert Uytterhoeven
2015-11-12 18:57   ` Matias Bjørling
2015-11-12 19:02     ` Linus Torvalds
2015-11-12 19:05       ` Matias Bjørling [this message]
2015-11-16 11:18 ` Thiago Farina
2015-11-16 11:21   ` Matias Bjørling

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=5644E2F5.707@bjorling.me \
    --to=m@bjorling.me \
    --cc=axboe@fb.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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.