Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755258AbZAJVou (ORCPT ); Sat, 10 Jan 2009 16:44:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752273AbZAJVom (ORCPT ); Sat, 10 Jan 2009 16:44:42 -0500 Received: from kanga.kvack.org ([205.233.56.17]:51929 "EHLO kanga.kvack.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbZAJVol (ORCPT ); Sat, 10 Jan 2009 16:44:41 -0500 X-Greylist: delayed 1095 seconds by postgrey-1.27 at vger.kernel.org; Sat, 10 Jan 2009 16:44:41 EST Date: Sat, 10 Jan 2009 16:26:25 -0500 From: Benjamin LaHaise To: Ingo Molnar Cc: linux-kernel@vger.kernel.org Subject: [x86-64] remove locked instruction from switch_to() Message-ID: <20090110212625.GE13467@kvack.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2079 Lines: 47 The patch below removes an unnecessary locked instruction from switch_to(). TIF_FORK is only ever set in copy_thread() on initial process creation, and gets cleared during the first scheduling of the process. As such, it is safe to use an unlocked test for the flag within switch_to()./ Signed-off-by: Benjamin LaHaise