From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
arnd-r2nGTMty4D4@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>,
ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
Subject: Re: [patch 143/166] preadv/pwritev: Add preadv and pwritev system calls.
Date: Fri, 03 Apr 2009 09:57:49 -0700 [thread overview]
Message-ID: <49D6400D.7040001@zytor.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0904021839390.15441-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Linus Torvalds wrote:
>
> Grr. That may make sense on 32-bit architectures, but makes no sense
> what-so-ever on 64-bit ones.
>
> Why not just say that it's two "unsigned long" arguments, and split it by
> "sizeof unsigned long". And then, on 64-bit architectures, the high bits
> can be ignored. You can even get gcc to optimize it all away by doing
> something like
>
> #define HALF_LONG (BITS_IN_LONG / 2)
>
> offset = (((loff_t)high << HALF_LONG) << HALF_LONG) | low;
>
> and then gcc should automaticaly notice that shifting up that way is just
> a fancy way of saying "0", and ignore the high bits.
>
> How married are people to this crazy 2x "32 bits" model?
>
I certainly am *not* happy with it, and said so when it was first
posted. My main complaint with it is that it introduces yet another
special case in the kernel<->userspace ABI, because although we've had
this problem before, it has been hacked around a different way every time.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
kraxel@redhat.com, arnd@arndb.de, linux-api@vger.kernel.org,
linux-arch@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
ralf@linux-mips.org, tglx@linutronix.de,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [patch 143/166] preadv/pwritev: Add preadv and pwritev system calls.
Date: Fri, 03 Apr 2009 09:57:49 -0700 [thread overview]
Message-ID: <49D6400D.7040001@zytor.com> (raw)
Message-ID: <20090403165749.TI25c72dWVaHVdn9q8EbF9si9ZNswvuwJxbWVdanZRA@z> (raw)
In-Reply-To: <alpine.LFD.2.00.0904021839390.15441@localhost.localdomain>
Linus Torvalds wrote:
>
> Grr. That may make sense on 32-bit architectures, but makes no sense
> what-so-ever on 64-bit ones.
>
> Why not just say that it's two "unsigned long" arguments, and split it by
> "sizeof unsigned long". And then, on 64-bit architectures, the high bits
> can be ignored. You can even get gcc to optimize it all away by doing
> something like
>
> #define HALF_LONG (BITS_IN_LONG / 2)
>
> offset = (((loff_t)high << HALF_LONG) << HALF_LONG) | low;
>
> and then gcc should automaticaly notice that shifting up that way is just
> a fancy way of saying "0", and ignore the high bits.
>
> How married are people to this crazy 2x "32 bits" model?
>
I certainly am *not* happy with it, and said so when it was first
posted. My main complaint with it is that it introduces yet another
special case in the kernel<->userspace ABI, because although we've had
this problem before, it has been hacked around a different way every time.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-04-03 16:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 23:59 [patch 143/166] preadv/pwritev: Add preadv and pwritev system calls akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
2009-04-02 23:59 ` akpm
[not found] ` <200904022359.n32NxNYu022834-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
2009-04-03 1:43 ` Linus Torvalds
2009-04-03 1:43 ` Linus Torvalds
2009-04-03 8:35 ` Gerd Hoffmann
2009-04-03 9:25 ` Gerd Hoffmann
2009-04-03 9:25 ` Gerd Hoffmann
[not found] ` <49D5D609.7030400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-04-03 11:53 ` Gerd Hoffmann
2009-04-03 11:53 ` Gerd Hoffmann
2009-04-03 11:53 ` Gerd Hoffmann
2009-04-03 15:03 ` Linus Torvalds
2009-04-03 19:57 ` Gerd Hoffmann
[not found] ` <49D66A22.7090909-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-04-03 20:08 ` Linus Torvalds
2009-04-03 20:08 ` Linus Torvalds
2009-04-04 17:38 ` Andrew Morton
2009-04-04 17:51 ` Linus Torvalds
[not found] ` <alpine.LFD.2.00.0904021839390.15441-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-03 16:57 ` H. Peter Anvin [this message]
2009-04-03 16:57 ` H. Peter Anvin
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=49D6400D.7040001@zytor.com \
--to=hpa-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-X9Un+BFzKDI@public.gmane.org \
--cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.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.