From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>,
Zack Weinberg <zackw@panix.com>,
Siddhesh Poyarekar <siddhesh@gotplt.org>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH v3 2/2] posix: Implement preadv2 and pwritev2
Date: Sat, 03 Jun 2017 11:29:00 -0000 [thread overview]
Message-ID: <CAMe9rOpTf6LC4fUWjNamk9mHFOfvZoyg72rLWoUgY-NTDCcHaw@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOqPfbjYPgEqmkWEAht+ZzGZk4wikhVCejUuMWtTdQjr8w@mail.gmail.com>
On Sat, Jun 3, 2017 at 4:27 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Jun 3, 2017 at 4:23 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 06/03/2017 01:04 PM, H.J. Lu wrote:
>>> On Sat, Jun 3, 2017 at 1:22 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>>> On Jun 02 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>>>>
>>>>> The x86-64 LO_HI_LONG can't be used for p{readv,writev}{64}v2. Add a
>>>>> new macro, LO_HI_LONG_FLAGS, to pass the off{64}_t and flags arguments.
>>>>
>>>> Why can't LO_HI_LONG just pass the padding unconditionally on x86_64?
>>>>
>>>
>>> To avoid the unnecessary (long) (((uint64_t) (val)) >> 32).
>>
>> I think the question is why you can't define it like this:
>>
>> (val), 0
>>
>> ? Are you concerned about the additional overhead of passing that
>> unnecessary zero at the end of the parameter list for other system
>> calls? Or would this result in an observable kernel interface
>> difference and break stuff?
>
> My patch has
>
> ndex 7b8bd79..a3fe2fa 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
> @@ -389,4 +389,9 @@
> #undef LO_HI_LONG
> #define LO_HI_LONG(val) (val)
>
> +/* Provide a macro to pass the off{64}_t and flags arguments on
> + p{readv,writev}{64}v2. */
> +#undef LO_HI_LONG_FLAGS
> +#define LO_HI_LONG_FLAGS(val, flags) (val), 0, (flags)
> +
> #endif /* linux/x86_64/sysdep.h */
>
> For LO_HI_LONG, it doesn't mater what the second one is. It makes
> no difference if -1 is passed. Why bother with 0?
>
BTW, LO_HI_LONG_FLAGS is still needed for x32 even if LO_HI_LONG
passes the second argument for x86-64.
--
H.J.
next prev parent reply other threads:[~2017-06-03 11:29 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 12:43 [PATCH v2 1/2] manual: Add preadv and pwritev documentation Adhemerval Zanella
2017-05-04 12:43 ` [PATCH v3 2/2] posix: Implement preadv2 and pwritev2 Adhemerval Zanella
2017-05-11 19:02 ` Adhemerval Zanella
2017-05-30 14:19 ` Adhemerval Zanella
2017-05-31 18:51 ` Adhemerval Zanella
2017-06-01 16:40 ` Siddhesh Poyarekar
2017-06-01 18:14 ` Adhemerval Zanella
2017-06-02 13:00 ` H.J. Lu
2017-06-02 13:04 ` Zack Weinberg
2017-06-02 13:34 ` Florian Weimer
2017-06-02 14:07 ` Adhemerval Zanella
2017-06-02 14:22 ` Zack Weinberg
2017-06-02 18:20 ` Adhemerval Zanella
2017-06-02 19:02 ` Florian Weimer
2017-06-02 19:46 ` Adhemerval Zanella
2017-06-03 1:47 ` H.J. Lu
2017-06-03 8:22 ` Andreas Schwab
2017-06-03 11:04 ` H.J. Lu
2017-06-03 11:23 ` Florian Weimer
2017-06-03 11:27 ` H.J. Lu
2017-06-03 11:29 ` H.J. Lu [this message]
2017-06-03 12:52 ` Andreas Schwab
2017-06-03 12:57 ` H.J. Lu
2017-06-03 13:48 ` Zack Weinberg
2017-06-03 13:52 ` H.J. Lu
2017-06-03 13:58 ` Zack Weinberg
2017-06-03 14:16 ` H.J. Lu
2017-06-03 15:28 ` Andreas Schwab
2017-06-04 13:42 ` H.J. Lu
2017-06-04 15:03 ` Zack Weinberg
2017-06-05 13:37 ` Adhemerval Zanella
2017-06-02 13:04 ` Tulio Magno Quites Machado Filho
2017-06-02 14:04 ` Adhemerval Zanella
2017-05-04 12:51 ` [PATCH v2 1/2] manual: Add preadv and pwritev documentation Florian Weimer
2017-05-04 13:47 ` Adhemerval Zanella
2017-05-04 18:46 ` Adhemerval Zanella
2017-05-04 18:46 ` Florian Weimer
2017-05-04 18:53 ` Adhemerval Zanella
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=CAMe9rOpTf6LC4fUWjNamk9mHFOfvZoyg72rLWoUgY-NTDCcHaw@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@linux-m68k.org \
--cc=siddhesh@gotplt.org \
--cc=zackw@panix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).