From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arjan van de Ven Subject: Re: How to add/drop SCSI drives from within the driver? Date: Wed, 08 Dec 2004 15:14:58 -0500 Message-ID: <1102536897.2830.39.camel@laptop.fenrus.org> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com ([66.187.233.31]:60859 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261347AbULHUQZ (ORCPT ); Wed, 8 Dec 2004 15:16:25 -0500 In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Bryan Henderson Cc: Matthew Wilcox , 'Andrew Morton' , "Mukker, Atul" , brking@us.ibm.com, "'bunk@fs.tum.de'" , "Doelfel, Hardy" , 'James Bottomley' , "'linux-scsi@vger.kernel.org'" , Matt Domsch , "Ju, Seokmann" , "Bagalkote, Sreenivas" On Wed, 2004-12-08 at 15:08 -0500, Bryan Henderson wrote: > >> I would also suggest __attribute__((packed)) since you're sharing with > >> userspace just to ensure you can never get it grown by the compiler > >> (it shouldn't be, but just to be safe). > > > >That's a bad idea, it forces the compiler to pessimise accesses to the > >struct on most hardware. > > How? We're assuming that it won't actually affect the layout of this > struct, so what does the compiler pessimize? it also makes the compiler assume the struct members aren't aligned to the natural alignment and thus it'll emit more expensive access paterns on architectures that care about such things. --