Mental Swap has two possible meanings.
One being what you have to do when you're deep in a MentalStateCalledFlow and something demands your immediate attention; requiring you to quickly swap out whatever you were thinking about for whatever the interruption is. A leading cause of DumpShock.
The other one being a description for your immediate working memory (much like swap space in any computer) when you're in the midst of flow. The JargonFile puts this nicely:
Some aspects of hacker etiquette will appear quite odd to an observer unaware of the high value placed on hack mode. For example, if someone appears at your door, it is perfectly okay to hold up a hand (without turning one's eyes away from the screen) to avoid being interrupted. One may read, type, and interact with the computer for quite some time before further acknowledging the other's presence (of course, he or she is reciprocally free to leave without a word). The understanding is that you might be in hack mode with a lot of delicate state (sense 2) in your head, and you dare not swap that context out until you have reached a good point to pause.