Re: Around ASSBASST and ASSBPHTM time fields
On 11/14/2019 9:25 AM, Michael Stein wrote: ... >> Q2. ... Because PHTM is for all types >> of SRBs. Is this the correct understanding? My CMG95 paper on these fields should help. I don't recall if that paper covered enclave tasks as well, but from the standpoint of the fields under discussion they work exactly like enclave SRBs. As Peter's answer noted, you do need to read the field's comments: in particular, "preemptible class" work is a superset of "preemptible" SRBs. Basically in 5.2 I needed to come up with a new term (preemptible class was the least bad at the time) to cover enclave SRBs, client SRBs, and "simple preemptible" SRBs (those with home=owner, which at the time we had no exploiters for). I also used "work" rather than "SRBs" because we knew we were adding enclave tasks next for DB2's use in stored procedures. A more accurate formulation is: Because PHTM is for all types of preemptible class work not running with the subject address space as home whose CPU time is not already accounted for by ASCBEJST. I don't need to talk about local or global SRBs in that formulation, because they're not "preemptible class" work. > find that those fields are only updated with CPU from the SRB routine > use after some types interrupts of the SRB routines involved. I would > usually expect this "interrupt" to be the SRB routine termination, but > other reasons (page fault?, wait for lock?, preemption?) might get those > ASSB CPU time fields updated with CPU time "used so far" sooner. Preemptible class work is regularly interrupted to see if something else should be dispatched (higher absolute priority, or same priority when the dispatcher is rotating within a priority). The CPU time is accounted for then. Local and global (aka non-preemptible) SRBs are the ones with "lumpy" time accounting of the sort you described. Bumping up one level of abstraction, this is the rule for the then-new ASSB fields: 1. PHTM + EJST + SRBT = all CPU time consumed by all work units with that address space = home 2. EJST + SRBT + ASST = all CPU time consumed _on behalf of_ that address space, regardless of the work units' home address space. One of the weirder consequences of enclaves' status as "memory-less peers" to address spaces is that their CPU time contributes to 1 but not to 2 (the enclave equivalent to 2 is enclave CPU time). -- John Arwe IBM Wave for z/VM Development product owner -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Around ASSBASST and ASSBPHTM time fields
and preemptable tasks Oops. I meant "enclave tasks", in case you were wondering what a preemptable task is. Peter Relson z/OS Core Technology Design -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Around ASSBASST and ASSBPHTM time fields
> Q1: My understanding is, at any point of time while all SRBs are being > executed in address space 'A', the ASSBASST of address space 'A' = > CPU time consumed by S1 + CPU time consumed by S2. > > It doesn't include the CPU time consumed by S3 because it is an enclave > SRB. Is this the correct understanding? > Yes > Q2. When the SRBs are being executed, the ASSBPHTM of address space > 'A' = CPU time consumed by S1 + S2 + S3. Because PHTM is for all types > of SRBs. Is this the correct understanding? Maybe, maybe not.. The first sentence is true if you have described all of the work going on related to this address space. The second is incomplete, since it does not mention enclave tasks or work running in this space but with a different home. If you choose to say that there is no such work in this case, then the sentence is correct for that case. > Q3. So the delta between PHTM and ASST would always result in the pure enclave >SRB CPU time of that address space? No. ASSBASST's comment: Additional SRB Service Time. CPU time is accumulated here for this address space's Preemptable SRBs and for Client Related SRBs for which this address space is the client. <> ASSBPHTM's comment: Preemptable-class Time. The CPU time for all types of preemptable SRBs (PSRB, CRSRB, ESRB) executing with this address space as their home space and preemptable tasks <> The commentary on the fields should lead you to understand that in general the answer is "no" (possibly it's correct for the specific scenario you mention if there are no other relevant work units involved). You cannot in general ignore the phrase "with this address space as their home space" or the phrase "and preemptable tasks". Peter Relson z/OS Core Technology Design -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Around ASSBASST and ASSBPHTM time fields
> From: "M.V Ram" > > Hello, I have a question regarding the ASSBASST and ASSBPHTM fields > of ASSB control block. > > To explain it better, I am quoting this example. > > Say, an address space 'A' schedules a "preemptable SRB S1" on > itself. Another address space 'B' schedules a "preemptable SRB S2" > into the address space 'A' and another address space 'C' schedules an >"Enclave SRB S3" into the address space 'A' > > So, there are three SRBs running under address space A. S1 = Preemptable > SRB Scheduled by 'A' into itself S2 = Preemtable SRB scheduled by 'B' > S3 = Enclave SRB scheduled by 'C' > > Q1: My understanding is, at any point of time while all SRBs are being > executed in address space 'A', the ASSBASST of address space 'A' = > CPU time consumed by S1 + CPU time consumed by S2. > > It doesn't include the CPU time consumed by S3 because it is an enclave > SRB. Is this the correct understanding? > > Q2. When the SRBs are being executed, the ASSBPHTM of address space > 'A' = CPU time consumed by S1 + S2 + S3. Because PHTM is for all types > of SRBs. Is this the correct understanding? > > Q3. So the delta between PHTM and ASST would always result in the pure enclave > SRB CPU time of that address space? Although those fields predate my experiences with MVS, I think you will find that those fields are only updated with CPU from the SRB routine use after some types interrupts of the SRB routines involved. I would usually expect this "interrupt" to be the SRB routine termination, but other reasons (page fault?, wait for lock?, preemption?) might get those ASSB CPU time fields updated with CPU time "used so far" sooner. So if the 3 SRBs are currently running (on 3 different CPUs) then none of the fields are likely to have been updated (yet) with the CPU they are using... My best guess... -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN