From: Denis Vlasenko <vda@ilport.com.ua>
To: Jeff Garzik <jgarzik@pobox.com>, Matthew Wilcox <matthew@wil.cx>
Cc: Greg KH <greg@kroah.com>,
Kristen Accardi <kristen.c.accardi@intel.com>,
linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
rajesh.shah@intel.com, akpm@osdl.org, torvalds@osdl.org
Subject: Re: [PATCH] 6700/6702PXH quirk
Date: Sun, 7 Aug 2005 18:46:29 +0300 [thread overview]
Message-ID: <200508071846.29292.vda@ilport.com.ua> (raw)
In-Reply-To: <20050806155755.GA17136@havoc.gtf.org>
On Saturday 06 August 2005 18:57, Jeff Garzik wrote:
> On Sat, Aug 06, 2005 at 09:50:13AM +0100, Matthew Wilcox wrote:
> > On Fri, Aug 05, 2005 at 11:34:55PM -0400, Jeff Garzik wrote:
> > > FWIW, compilers generate AWFUL code for bitfields. Bitfields are
> > > really tough to do optimally, whereas bit flags ["unsigned int flags &
> > > bitmask"] are the familiar ints and longs that the compiler is well
> > > tuned to optimize.
> >
> > I'm sure the GCC developers would appreciate a good bug report with a
> > test-case that generates worse code. If you don't want to mess with their
> > bug tracking system, just send me a test case and I'll add it for you.
>
> Its an order-of-complexity issue. No matter how hard you try,
> bitfields will -always- be tougher to optimize, than machine ints.
>
> Bitfields are weirdly-sized, weirdly-aligned integers. A simple look at
> the generated asm from gcc on ARM or MIPS demonstrates the explosion of
> code that can sometimes occur, versus a simple 'and' test of a machine
> int and a mask. x86 is a tiny bit better, but still more expensive to
> do bitfields than machine ints.
But we are talking about one-bit field here:
+ unsigned int no_msi:1; /* device may not use msi */
If _this_ isn't optimized nicely into ANDs, ORs, etc, then
bug report is in order and gcc should be fixed.
--
vda
next prev parent reply other threads:[~2005-08-07 15:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 16:27 [PATCH] 6700/6702PXH quirk Kristen Accardi
2005-08-05 17:12 ` Bjorn Helgaas
2005-08-05 17:20 ` Kristen Accardi
2005-08-05 18:35 ` Greg KH
2005-08-05 19:10 ` Kristen Accardi
2005-08-05 22:05 ` Kristen Accardi
2005-08-05 22:26 ` Andrew Morton
2005-08-05 22:40 ` Kristen Accardi
2005-08-05 22:51 ` Andrew Morton
2005-08-05 22:57 ` Greg KH
2005-08-06 3:34 ` Jeff Garzik
2005-08-06 8:50 ` Matthew Wilcox
2005-08-06 15:57 ` Jeff Garzik
2005-08-07 15:46 ` Denis Vlasenko [this message]
2005-08-08 17:42 ` Zach Brown
2005-08-08 17:45 ` David S. Miller
2005-08-08 17:53 ` Zach Brown
2005-08-05 22:50 ` Jeff Garzik
2005-08-05 23:51 ` Kristen Accardi
2005-08-08 16:36 ` Bjorn Helgaas
2005-08-08 17:57 ` Kristen Accardi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200508071846.29292.vda@ilport.com.ua \
--to=vda@ilport.com.ua \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=jgarzik@pobox.com \
--cc=kristen.c.accardi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=matthew@wil.cx \
--cc=rajesh.shah@intel.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox