Skip to content
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

Provide control over which replayed core is which output drmemtrace stream #6726

Open
derekbruening opened this issue Mar 26, 2024 · 0 comments

Comments

@derekbruening
Copy link
Contributor

In the drmemtrace scheduler, some sort of full control over which replayed core should be which output stream would be good, as the comment in read_traced_schedule() says:

// We initially number the outputs according to their order in the file.
// XXX i#5843: Should we support some direction from the user on this?  Simulation
// may want to preserve the NUMA relationships and may need to set up its simulated
// cores at init time, so it would prefer to partition by output stream identifier.
// Maybe we could at least add the proposed memtrace_stream_t query for cpuid and
// let it be called even before reading any records at all?

As a first step, we should at least sort the cpuids, as raw2trace inserts them in whatever hashtable order they were in, which is essentially random. E.g., on 2 sockets, the order for one trace has the 2 sockets completely intermixed: 4185,70,4207,4126,4129,69,... (the top bit 4096 marks the 2nd socket). This means the replay will not match the original order.

derekbruening added a commit that referenced this issue Mar 26, 2024
Currently, in as-traced mode the output streams are assigned to the
cores in the as-traced schedule file in file order.  But that order is
essentially random, which scrambles key arrangements like which core
is on which socket.  Here we sort by the recorded cpuid to recreate
the same cpuid order as before.

Adds a unit test.  Also tested on larger cases with > 100 cores.

Issue: #6726
derekbruening added a commit that referenced this issue Mar 27, 2024
Currently, in as-traced mode the output streams are assigned to the
cores in the as-traced schedule file in file order. But that order is
essentially random, which scrambles key arrangements like which core is
on which socket. Here we sort by the recorded cpuid to recreate the same
cpuid order as before.

Adds a unit test.  Also tested on larger cases with > 100 cores.

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

No branches or pull requests

1 participant