Question: Just wondering if there is any way to put emacs and shell in the same window. Like split the shell in to two parts, one for shell it self, the other one for emacs. Or is there any way to switch the shell window and emacs window quickly?

The reason I am asking this is: sometimes I need to run my program with shell command, that I have to close the emacs and go back to the shell window. It is a little waste of time to switch back and forth.

Thank you

Answer: 
Try enabling the `discard` mount option for an Ext4 filesystem and running a recent Linux kernel. This option is being used for SSDs mainly. At the same time it is being currently supported by [`zram`](https://www.kernel.org/doc/Documentation/blockdev/zram.txt) too.
Use fstrim command:
`fstrim -v /tmp`