llnl / llnl/UnifyFS

Sorting of read requests complicates matching aio list

Open
#400 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
122
Forks
34
PR merge metrics
No merged PRs in 30d

Description

In order to efficiently coalesce contiguous read requests, they are first sorted by file id and then by file offset:
https://github.com/LLNL/UnifyFS/blob/48ed1c42ac59eda4b03fe134bacbc7332c9dc78a/client/src/unifyfs-sysio.c#L1809

However, after the reads have been processed, there is a loop that updates aio fields. Because the requests may have been reordered from the above sort, this uses the user buffer to match:
https://github.com/LLNL/UnifyFS/blob/48ed1c42ac59eda4b03fe134bacbc7332c9dc78a/client/src/unifyfs-sysio.c#L1178

This is slow for a long list, since it may be an N^2 operation.

It might also be wrong if there are multiple requests that specify the same user buffer, if that's a case we need to worry about.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the sorting logic near line 1809 and the aio-field update loop near line 1178 in client/src/unifyfs-sysio.c. Trace how requests are reordered and matched, especially when multiple requests share a user buffer. Done means matching no longer requires an N^2 scan and remains correct for duplicate buffers.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.