From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: linux-ia64@vger.kernel.org
Subject: RE: __copy_user exception handling
Date: Fri, 29 Jul 2005 23:23:33 +0000 [thread overview]
Message-ID: <200507292323.j6TNNZg19721@unix-os.sc.intel.com> (raw)
In-Reply-To: <20050729221044.GA23144@kirby.fc.hp.com>
Matt Chapman wrote on Friday, July 29, 2005 3:11 PM
> The main __copy_user loop looks like this:
>
> 2:
> EX(.failure_in3,(p16) ld8 val1[0]=[src1],16)
> (p16) ld8 val2[0]=[src2],16
>
> EX(.failure_out, (EPI) st8 [dst1]=val1[PIPE_DEPTH-1],16)
> (EPI) st8 [dst2]=val2[PIPE_DEPTH-1],16
> br.ctop.dptk 2b
>
> What I'm trying to understand is why there is no EX necessary on the
> second store. As far as I understand the implementation, src is 16-byte
> aligned here, so there is no need for EX on the second load, since it
> necessarily hits the same page. But dst is only 8-byte aligned, so I
> would think that the second store could fault.
Because exception handler use to work at instruction bundle granularity.
The first EX would automatically catch the 2nd ld8 or st8, with a caveat
that this code is assuming gcc 2.x tool chain. With moving to gcc 3.x
assembler where it understand local tag support, the exception handler
works at instruction granularity and then all the sudden, it falls flat
on its face.
> I've done some testing and for some reason it doesn't seem to be a
> problem in Linux; I haven't been able to produce an oops. But I've hit
> oopses in Xen (we use the same code), and so I'm trying to understand
> *why* it's not a problem in Linux.
Are you sure you want to use this code? It's for first incarnation of
Itanium. The kernel has an optimized version of copy_user for Itanium2.
See memcpy_mck.S
- Ken
next prev parent reply other threads:[~2005-07-29 23:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-29 22:10 __copy_user exception handling Matt Chapman
2005-07-29 23:23 ` Chen, Kenneth W [this message]
2005-07-29 23:33 ` Matt Chapman
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=200507292323.j6TNNZg19721@unix-os.sc.intel.com \
--to=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.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