When binding processes/threads to certain cpu cores, being able to sort top(1) output by core number would be very useful. This patch adds the ability to sort the top(1) output by cpu core.
I would suggest explaining the difference between -o cpu and -o core in the description of the -o option.
I find it odd to use ki_lastcpu in the sort key. On a system with many idle processes it means that we will not show a busy thread on CPU 0. For your use-case, shouldn't a running thread always come before an idle thread?