Skip to content

0.30.2 #124

Merged
merged 9 commits into from
Mar 6, 2022
Merged

0.30.2 #124

merged 9 commits into from
Mar 6, 2022

Conversation

donald
Copy link
Contributor

@donald donald commented Mar 6, 2022

  • support unpredictable gpu idents
  • new gpu policy: a100_split_3 ( 3 x 2g.10gb )
  • minor cleanups

Don't display the job columns we are going to remove in the next commit.
The columns were included to support job restarts. However, that has
never been implemented. So remove the unused columns.

Note: This change reduced the size of our mxq_job.ibd with 35824930 rows
from 32GB to 24GB which is more than I've expected.
Declare functions w/o arguments explicitly to satisfy my personal
aesthetics.

A function declaration `void foo()` has as unspecified argument list
while a function declared as `void foo(void)` has explicitly no
arguments.

On x86_64 this makes a slight difference on how this functions needs to
be called. Because a function with an unspecified argument list might be
a variadic function, the ABI requires that the caller sets %al to the
number of floating point registers which might have been used to pass
in floating point parameters:

"For calls that may call functions that use varargs or stdargs
(prototype-less calls or calls to functions containing ellipsis (...) in
the declaration) %al is used as hidden argument to specify the number of
vector registers used. The contents of %al do not need to match exactly
the number of registers, but must be an upper bound on the number of
vector registers used and is in the range 0–8 inclusive" [1]

If the callee is a variadic function, the usual routine in the function
prologue is to save the registers, which might have been used to pass
parameters, to memory so that they can be access one-by-one in the
function body via pointers or indices. To give the callee an uppper bound
of the number of floating point registers used to pass parameters opens
an opportunity to avoid saving unused registers.

The call of foo in

    void foo();
    void bar(void) {
        foo();
    }

might compile to something like

    movl $0, %eax
    call foo

The `movl $0, %eax` instruction would not be needed if foo was defined
as `void foo(void)`.

Note 1: gcc avoids the unneeded instructions to set up %al with -O1 or
higher O1` if the function is known to be non-variadic because it is
defined in the compilation uniti where it is used.

Note 2: gcc function prologue for variadic functions just checks whether
%al is zero or not and either saves none or all 8 floating point
registers potentially used for arguments.

Note 3: An instruction to clear %al (e.g. `31 c0 :  xor %eax, %eax`)
might have zero runtime cost on a modern processors. This change here is
not a relevant optimization. I said, this is more about aesthetics.

[1]: https://refspecs.linuxfoundation.org/elf/x86_64-abi-0.99.pdf
Before we add more A100 policies, factor out common code into two
separate shell functions.
Add policy to create thee 2g.10gb instances on a A100.
@donald donald merged commit 6050cf3 into master Mar 6, 2022
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant