From: Yury Norov <ynorov@caviumnetworks.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Florian Weimer <fw@deneb.enyo.de>,
Chris Metcalf <cmetcalf@mellanox.com>,
<libc-alpha@sourceware.org>
Subject: Re: [PATCH] Consolidate Linux readahead() implementations
Date: Fri, 23 Sep 2016 15:45:00 -0000 [thread overview]
Message-ID: <20160923154444.GC970@yury-N73SV> (raw)
In-Reply-To: <b7240bee-cf16-8c9c-de3f-6ba88d129a66@linaro.org>
On Fri, Sep 23, 2016 at 11:24:32AM -0300, Adhemerval Zanella wrote:
>
>
> On 23/09/2016 11:11, Yury Norov wrote:
> > On Fri, Sep 23, 2016 at 10:32:35AM -0300, Adhemerval Zanella wrote:
> >>
> >> Indeed, unfortunately tile seems to get its own readahead definition.
> >> However I think it should not prevent us to use my previous strategy,
> >> we can follow the SH example for pread (where it adds a dummy argument
> >> before offset), and do something as:
> >>
> >> sysdeps/unix/sysv/linux/tile/readahead.c
> >>
> >> #include <sysdep.h>
> >>
> >> #ifndef _LP64
> >> /* Although tile 32-bit ABI passed 64-bit arguments in even registers,
> >> readahead interface does not follow this convention. */
> >> # undef __ALIGNMENT_ARG
> >> #endif
> >>
> >> #include <sysdeps/unix/sysv/linux/readhead.c>
> >
> > Currently it looks like this to me (see below). If you think that separated file
> > is better than new option - I'm OK with it, but I think it's strange because in
> > other patches of series you introduce options (if I'm not mistake).
>
> I prefer to not add any more __ASSUME macro until it is more general
> and for this specific case (tile seems the only supported ABI that
> implements readhead different than usual ABI).
>
> >
> > We also have 2 another implementations - in linux/wordsize-64/syscalls.list
> > and linux/mips/mips64/n32/syscalls.list.
> >
> > I think wordsize-64 is safe to generalize, but I'm worry about mips64. If we'll
> > choose adding new options and so having a single file, it seems, we'll have to
> > add another option for mips64/n32, like this:
>
> My understanding is mipc64n32 adds it on syscall list to avoid current
> default Linux implementation where it splits the off64_t (since mips64n32
> passes off64_t in only one register afaik). I think it is safe here,
> since SYSCALL_LL64 for mips64n32 will correctly pass only one argument
> instead of splitting it.
OK. So for v2:
- remove arm, mips, wordsize-64, powerpc implementations
- generalize linux/readahead.c like below
- add tile exception
- remove all new __ASSUME
If it's correct, I'll send new patch this evening or tomorrow.
Yury.
> > ssize_t
> > __readahead (int fd, off64_t offset, size_t count)
> > {
> > - return INLINE_SYSCALL (readahead, 4, fd,
> > - __LONG_LONG_PAIR ((off_t) (offset >> 32),
> > - (off_t) (offset & 0xffffffff)),
> > - count);
> > + return INLINE_SYSCALL_CALL (readahead, fd, __ALIGNMENT_ARG
> > + SYSCALL_LL64 (offset));
next prev parent reply other threads:[~2016-09-23 15:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 20:44 Yury Norov
2016-09-22 20:59 ` Dmitry V. Levin
2016-09-22 21:26 ` Adhemerval Zanella
2016-09-22 21:36 ` Adhemerval Zanella
2016-09-22 23:21 ` Yury Norov
2016-09-23 6:08 ` Florian Weimer
2016-09-23 12:45 ` Yury Norov
2016-09-23 13:32 ` Adhemerval Zanella
2016-09-23 14:12 ` Yury Norov
2016-09-23 14:24 ` Adhemerval Zanella
2016-09-23 15:45 ` Yury Norov [this message]
2016-09-23 19:50 ` 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=20160923154444.GC970@yury-N73SV \
--to=ynorov@caviumnetworks.com \
--cc=adhemerval.zanella@linaro.org \
--cc=cmetcalf@mellanox.com \
--cc=fw@deneb.enyo.de \
--cc=libc-alpha@sourceware.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 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).