sched/completions/Documentation: Add recommendation for dynamic and ONSTACK completions
authorNicholas Mc Guire <hofrat@osadl.org>
Tue, 16 Oct 2018 13:45:39 +0000 (15:45 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 17 Oct 2018 06:30:10 +0000 (08:30 +0200)
commit11e13696a08e838ba48c72404c2b3f41429b5b20
tree7c730b6e28bdb7cb3415e541e2b7283c4e6f0054
parent0c373344b5c1eaa9e186368a32a169a2802be3ca
sched/completions/Documentation: Add recommendation for dynamic and ONSTACK completions

To prevent dynamic completion objects from being de-allocated while still
in use, add a recommendation to embed them in long lived data structures.

Also add a note for the on-stack case that emphasizes the dangers of
the limited scope, and recommends dynamic allocation if scope limitations
are not clearly understood.

[ mingo: Minor touch-ups of the text, expanded it a bit to make the
         warnings Nicholas added more prominent. ]

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: john.garry@huawei.com
Link: http://lkml.kernel.org/r/1539697539-24055-1-git-send-email-hofrat@osadl.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Documentation/scheduler/completion.txt