Messages in this thread |  | | | From | Paul Menage <> | | Subject | Re: [RFC] Rearranging struct dentry for cache affinity | | Date | Fri, 12 Jul 2002 14:21:04 -0700 |
| |
>On Fri, Jul 12, 2002 at 01:38:35PM -0700, Paul Menage wrote: > > > - dentry->d_vfs_flags |= DCACHE_REFERENCED; > > +#ifdef CONFIG_SMP > > + if(!(dentry->d_vfs_flags & DCACHE_REFERENCED)) > > +#endif > > + dentry->d_vfs_flags |= DCACHE_REFERENCED; > >Yuck. Is doing this conditional on UP really a measurable effect?
I'm don't know yet - I did some brief tests on x86 UP to see how much positive/negative effect the branch misses versus the cache dirtying had, and (using an exponentially decaying distribution of entries being tested/set) the if() statement did show an improvement for sufficiently skewed distributions. But I've no idea yet how that matches up to the distributions that we'd see in the dcache in actual use. As I said in an earlier email, it might be nice to have an __ensure_bit_set() function that uses architecture-specific knowledge to make sure a particular bit is set as efficiently as possible. (e.g. taking advantage of predicated writes, etc).
>If you must microoptimise >to this level, at least try and keep the code clean.
Sure - this is just a quick [RFC] hack.
Paul
- 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/
|  |