Inconsistent default values for cmd pipe depth across apps

Aperta
#1,122 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Inizia individuando i valori predefiniti della pipe di input dei comandi per DS e CFE SB, quindi esamina le impostazioni delle altre app insieme alla configurazione OS_QUEUE_MAX_DEPTH. Compila e avvia le app con OS_QUEUE_MAX_DEPTH impostato su 10; il lavoro è completato quando ogni app compila e si avvia senza richiedere una profondità della coda maggiore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
All apps have a setting to control the depth (and name, ideally) of their respective command input pipe.
The problem is many of these are hardcoded to an integer number that is often much larger than it really needs to be.

For example DS has its pipe depth configured to 45. This is very large.
CFE SB had its pipe depth fixed at 32 and was non-configurable, as it was in a local header file.

As most linux distros will (by default) limit POSIX message queue pipe depth to 10, the CFS defaults should also work with OS_QUEUE_MAX_DEPTH set to 10, since this would be the "proper" solution (as opposed to the debug solution of silently truncating the depth to 10 even though a larger queue was requested).

To Reproduce
Set OS_QUEUE_MAX_DEPTH osal configuration parameter to 10 so it will boot normally on an un-tweaked Linux kernel without needing root privileges.

Some apps will fail to compile with default config, other apps will fail to boot even if they do compile.

Expected behavior
All apps should compile and boot with the queue depth set to 10.

The approach should be to use the conservative (but universally supportable) value as the default. A depth of 10 is more than enough so long as there is no CPU contention (i.e. tasks wake up to service their queue in a timely fashion).

System observed on:
Linux

Additional context
The user can extend/increase the value if their needs dictate, but a need for a deep queue depth probably indicates a more fundamental architectural issue like a CPU not having enough margin to process the workloads effectively. In these scenarios where the consumer is not keeping pace with the sender and multiple items start backing up, a deeper queue usually just delays the failure, it does not fix it.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Lingua principale
C
Stelle
1.6k
Fork
421
Merge medio
1g 42m
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nasa/cFS

Tutte le issue di nasa/cFS

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.