1. A method, comprising: performing by one or more computing nodes in a multi-socket system that supports multithreading and that implements a hardware transactional memory: beginning execution, on the multi-socket system, of a multithreaded application that includes accesses to a shared resource, wherein the shared resource is accessible by a plurality of threads of the multithreaded application; attempting, by a particular thread of the plurality of threads, to execute a critical section of the multithreaded application on a particular socket of the multi-socket system; determining, based at least in part, on a current socket scheduling mode, whether the particular thread is allowed to currently execute the critical section on the particular socket, wherein the current socket scheduling mode is one of a plurality of socket scheduling modes, wherein the current socket scheduling mode indicates whether the particular thread may execute the critical section on the particular socket.