I am going to digress a bit here. I got into a discussion with Martin Packer about some of this and it raised a few interesting thoughts :
(1) What percentage of executed MVCL instructions are for clearing storage versus actually moving data? I know that in the software I am involved in, that "MVCL(*)" for clearing is used *way* more than any movement purposes as I am a heavy user of CPOOL services. Obviously you can have "fast clear" for objects with lengths that 256-multiple using n*XC - however I have often wished for a ZERO=YES option on the CPOOL BUILD so that you are guaranteed a clean cell for each subsequent CPOOL GET. If anyone else agrees, I might consider raising a Share requirement .... (2) Is there any performance difference in MVCL when L2 is zero? I seem to recall hearing a while ago that there might be...however am not sure. (3) How does MVC v MVCL compare in AR mode with source and target using different ALETs ? (*) Yes - I have a @MVCL macro too :-) Rob Scott Lead Developer Rocket Software 275 Grove Street * Newton, MA 02466-2272 * USA Tel: +1.617.614.2305 Email: rsc...@rs.com Web: www.rocketsoftware.com -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Charles Mills Sent: 01 June 2011 14:20 To: IBM-MAIN@bama.ua.edu Subject: Re: What is the current feeling for MVC loop vs. MVCL? This thread has been really informative. I am going to put this to use. I have code that is executing a million or so ~8K MVCLs a day. I have other things on my plate at the moment but I will replace that with an MVC loop at some point. It seems to me like the ideal way to do this would be to have not two stages (MVC for 256 and EX'ed MVC) but rather three cases: A loop with a "hard-coded" or "unrolled" string of 16 MVC's that moved 4K blocks and incremented registers by 4K on each iteration; followed by a loop of 256-byte MVCs; followed by an EX'ed MVC for 1 to 255 bytes. (Obviously each step would be optional depending on the exact count.) Thoughts? Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of David Crayford Sent: Tuesday, May 31, 2011 8:32 PM To: IBM-MAIN@bama.ua.edu Subject: Re: What is the current feeling for MVC loop vs. MVCL? On 1/06/2011 12:13 AM, Kirk Wolf wrote: > The IBM C compiler would generate an MVC loop. So, that's how IBM feels I > guess. > And when the length is a constant it generates multiple MVC instructions to eliminate branches. Kind of like loop unrolling. * * char input[528]; * * memcpy( output, input, sizeof input ); MVC (*)void(256,r1,0),input(r4,1508) MVC (*)void(256,r1,256),input(r4,1764) MVC (*)void(16,r1,512),input(r4,2020) And if you increase the size of the buffer it generates a loop with loop unrolling (if that makes sense). There seems to be a HWM where it drops into a loop. * * char input[10000]; * * memcpy( output, input, sizeof input ); LA r0,5 LA r6,2176(r4,) @2L4 DS 0H MVC (*)void(256,r1,0),input(r6,0) MVC (*)void(256,r1,256),input(r6,256) MVC (*)void(256,r1,512),input(r6,512) MVC (*)void(256,r1,768),input(r6,768) MVC (*)void(256,r1,1024),input(r6,1024) MVC (*)void(256,r1,1280),input(r6,1280) MVC (*)void(256,r1,1536),input(r6,1536) LA r1,(*)void(,r1,1792) LA r6,input(,r6,1792) BRCT r0,@2L4 MVC (*)void(256,r1,0),input(r6,0) MVC (*)void(256,r1,256),input(r6,256) MVC (*)void(256,r1,512),input(r6,512) MVC (*)void(256,r1,768),input(r6,768) MVC (*)void(16,r1,1024),input(r6,1024) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html