[lkml]   [2012]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: [PATCH] x86/copy_user_generic: Optimize copy_user_generic with CPU erms feature
    > From: David Miller []
    > Sent: Thursday, May 24, 2012 6:50 PM
    > From: "Fenghua Yu" <>
    > Date: Thu, 24 May 2012 18:19:45 -0700
    > > According to Intel 64 and IA-32 SDM and Optimization Reference
    > > Manual, beginning with Ivybridge, REG string operation using MOVSB
    > > and STOSB can provide both flexible and high-performance REG string
    > > operations in cases like memory copy. Enhancement availability is
    > > indicated by CPUID.7.0.EBX[9] (Enhanced REP MOVSB/ STOSB).
    > How does the cpu do overlap detection?
    > If the cpu does overlap detection on sub-pagesize bits, performance
    > will unnecessarily suffer under such circumstances.

    Are you talking about memory overlap between source and destination? There is no overlap between these two areas in copy_user case because one area is in user space and another one is in kernel space.

    In overlap case, it's software that detects overlap and sets backward copy. I don't see backward rep movsb performance degradation from my measurement.



     \ /
      Last update: 2012-05-25 05:01    [W:0.046 / U:8.316 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site