Skip to content

Progress64 benchmarks #850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

StefanoDalMas
Copy link
Contributor

This PR adds benchmarks and tests from Progress64 by ARM.
At the moment only the clients which do not use mixed size concurrency instructions are inserted.

StefanoDalMas added 5 commits April 11, 2025 09:04
Signed-off-by: StefanoDalMas <[email protected]>
Signed-off-by: StefanoDalMas <[email protected]>
Signed-off-by: StefanoDalMas <[email protected]>
Signed-off-by: StefanoDalMas <[email protected]>
return NULL;
}

int main(void) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a good test for seqlock? Take a look to this. We should definitely use more than a single writer and a single reader.

return NULL;
}

int main() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good test for a read-write lock. Take a look to this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't even comile, no? Where are lock, x, y defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah! I think I added the definition of those two in the src file, adding that now

@@ -0,0 +1,21 @@
# How to generate LLVM files with Inline Asm with Progress64

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasHaas can you try this on your arm machine to check the documentation is correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasHaas can you try this on your arm machine to check the documentation is correct?

rwlock.c doesn't compile because it misses definitions for the shared variables.

For seqlock.c I get this error:

/Users/thomashaas/ExternalTools/progress64/src/arch/ldxstx.h:223:24: error: controlling expression type 'uintptr_t *' (aka 'unsigned long *') not compatible with any generic association type
    return (void *)ldx((uintptr_t *)var, mm);
                       ^~~~~~~~~~~~~~~~
/Users/thomashaas/ExternalTools/progress64/src/arch/ldxstx.h:203:11: note: expanded from macro 'ldx'
_Generic((var), \
          ^~~
/Users/thomashaas/ExternalTools/progress64/src/arch/ldxstx.h:227:16: error: controlling expression type 'uintptr_t *' (aka 'unsigned long *') not compatible with any generic association type
    return stx((uintptr_t *)var, (uintptr_t)val, mm);

And a bunch of warnings that the assembly uses wrong register sizes:

/Users/thomashaas/ExternalTools/progress64/src/arch/ldxstx.h:195:27: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
                   : "r" (neu), "r" (var)
                          ^
/Users/thomashaas/ExternalTools/progress64/src/arch/ldxstx.h:193:35: note: use constraint modifier "w"
    __asm volatile("stxp %w0, %1, %H1, [%2]"
                                  ^~~
                                  %wH1

These are all errors/warnings inside progress64, so I don't know how much we can do about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as Clang complains at times when GCC does not , in order to make that work I had to tweak some lines in the file which contains the inline asm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a huge red flag. We should keep changes to a minimal and if changes are indeed needed we need to

  • provide a patch so someone else can regenerate the llvm files if needed
  • document why the change is indeed needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants