HomeFreeBSD

amd64: depessimize copyinstr_smap

Description

amd64: depessimize copyinstr_smap

The stac/clac combo around each byte copy is causing a measurable
slowdown in benchmarks. Do it only before and after all data is
copied. While here reorder the code to avoid a forward branch in
the common case.

Note the copying loop (originating from copyinstr) is avoidably slow
and will be fixed later.

Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17063

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D17063: depessimize copyinstr_smap
Parents
rS338507: Avoid resource deadlocks when one domain has exhausted its memory. Attempt
Branches
Unknown
Tags
Unknown