Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934041Ab2JXJNs (ORCPT ); Wed, 24 Oct 2012 05:13:48 -0400 Received: from mx0.aculab.com ([213.249.233.131]:34235 "HELO mx0.aculab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753236Ab2JXJNq convert rfc822-to-8bit (ORCPT ); Wed, 24 Oct 2012 05:13:46 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT Subject: RE: [RFC PATCH v2 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio() Date: Wed, 24 Oct 2012 10:06:36 +0100 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: thread-topic: [RFC PATCH v2 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio() thread-index: Ac2xMehlIZK+/a3NSEiPhIv77D7QvwAk8FDQ References: From: "David Laight" To: "Ming Lei" , "Alan Stern" Cc: , "Oliver Neukum" , "Minchan Kim" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Jens Axboe" , "David S. Miller" , "Andrew Morton" , , , , Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 26 > Looks the problem is worse than above, not only bitfields are affected, the > adjacent fields might be involved too, see: > > http://lwn.net/Articles/478657/ Not mentioned in there is that even with x86/amd64 given a struct with the following adjacent fields: char a; char b; char c; then foo->b |= 0x80; might do a 32bit RMW cycle. This will (well might - but probably does) happen if compiled to a 'BTS' instruction. The x86 instruction set docs are actually unclear as to whether the 32bit cycle might even be misaligned! amd64 might do a 64bit cycle (not checked the docs). David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/