TLDR; If /tmp in mounted as tmpfs, in the presence of swap, is there any kind of priority when swapping ? Does tmpfs start to swap before applications ?
FULL STORY
I have a laptop with 32G of RAM (Debian), and 32G of swap. I plan to mount /tmp with tmpfs.
But I am concerned with the behavior if the system needs to swap : what will swap first ? I guess (and I hope) that applications will have priority for RAM usage over tmpfs (e.g., I guess tmpfs will swap first). But I couldn't find any confirmation for this.
More broadly, are there any scenarios where mounting /tmp as tmpfs can slow down the system ?