1. A method for dispatching a software thread to a logical processor in a shared processor logical partition, the method comprising: responsive to a software thread being made ready to run, determining whether cache affinity is not likely to provide a performance benefit; responsive to a determination that cache affinity is not likely to provide a performance benefit, selecting a logical processor based on other criteria and queuing the software thread to run on the selected logical processor; responsive to a determination that cache affinity is likely to provide a performance benefit, identifying a logical processor on which the software thread was last dispatched and queuing the software thread to run on the logical processor on which the software thread was last dispatched, wherein determining that cache affinity is likely to provide a performance benefit comprises: determining that a period of time the software thread has been undispatched is less than a predetermined period of time; determining whether the logical processor on which the software thread was last dispatched has not been undispatched since the last time the software thread was dispatched; determining whether the logical processor on which the software thread was last dispatched has been dispatched and undispatched since the last time the software thread was undispatched; determining that a number of non-affinity dispatches of the logical processor on which the software thread was last dispatched is not non-zero; and determining that the number of times the logical processor on which the software thread was last dispatched has been dispatched and undispatched is not greater than a threshold.