Skip to content

Process list: type filter (#294) and secondary sort key (#473) - #500

Open
Code4me2 wants to merge 1 commit into
Syllo:masterfrom
Code4me2:issue-294-473-process-options
Open

Process list: type filter (#294) and secondary sort key (#473)#500
Code4me2 wants to merge 1 commit into
Syllo:masterfrom
Code4me2:issue-294-473-process-options

Conversation

@Code4me2

Copy link
Copy Markdown

Two related process-list enhancements.

#294 — Filter the process list by workload type

New Show only process type option: All / Compute only / Graphical only. Useful when you mainly care about compute workloads and want to hide graphical processes.

  • New enum process_type_filter option; filter applied after the per-device process lists are merged.
  • Selectable in the F2 → Process List menu (new "Show only process type" dropdown) and persisted in the config (ProcessTypeFilter = all|compute|graphical).
  • Semantics: compute only keeps compute + compute+graphical (+ unknown, so untyped entries aren't silently hidden); graphical only keeps graphical + compute+graphical.

Validated on a DGX Spark (GB10): with the single running CUDA process (compute type), all and compute show it and graphical hides it.

#473 — Secondary sort key (multi-field sort)

Sort by a primary field then a secondary field, e.g. GPU% desc, then GPU memory desc.

  • New sort_processes_by_secondary option.
  • The F6 sort window now shows Sort by/Then by and Tab switches between editing the primary and secondary key (the * marks the current key for the active mode).
  • Also selectable under F2 → Process List → "Sort by (then)".
  • Persisted in the config (SortBySecondary = ..., e.g. none when unset).
  • A uniform ascending/descending direction applies to all sort keys (matching the request's "GPU usage % Desc, then GPU Memory Desc").

Implementation

  • Refactored the per-field comparators into one three-way compare_process_field() plus a small chained multi-key comparator (compare_process_multi), since qsort needs consistent 0/tie handling for stable multi-key ordering. This also fixes the pre-existing compare_process_type_asc copy-paste bug (it was comparing by name).
  • Adds process_none sentinel and enum process_type_filter.

Testing

  • #294 filter verified at runtime on real hardware (compute/all show the process, graphical hides it).
  • #473 ordering verified with a unit-style harness (GPU desc→mem desc yields expected order; tie-break works).
  • Config save/load round-trip verified (F12 writes SortBySecondary/ProcessTypeFilter; snapshot loads them cleanly).
  • Clean build; F2 setup window and F6 sort window render without regressions.

Closes #294 and #473.

Two related process-list enhancements:

Syllo#294 - Process type filter
Add a 'Show only process type' option (All / Compute only / Graphical
only) so users who mostly care about compute workloads can declutter the
process list. The filter is applied after the process list is merged
across devices and is also honored in the F2 setup menu and persisted in
the config file (ProcessTypeFilter = all|compute|graphical).

Syllo#473 - Multi-field sorting
Allow a secondary sort key so the list can be ordered by e.g. GPU usage
desc, then GPU memory desc. The F6 quick-sort window now supports Tab to
edit the primary/secondary key ('Sort by' / 'Then by'), the F2 setup menu
gains a 'Sort by (then)' dropdown, and the new option is persisted in the
config file (SortBySecondary = ...).

Implementation notes:
- The per-field comparators were refactored into a single three-way
  comparator (compare_process_field) and a small chained multi-key
  comparator, so a uniform ascending/descending direction applies to all
  sort keys (matching the request's 'GPU% Desc, then GPU memory Desc').
- Adds process_none sentinel and enum process_type_filter.
- New config keys: SortBySecondary, ProcessTypeFilter.

Closes Syllo#294 and Syllo#473.
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.

Option for Showing Only Compute/Graphical

1 participant