Re: [RFC/PATCH 2/5] mm/fs: add execute in place support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Middeweken 11 Mai 2005 18:19, Carsten Otte wrote:
> Badari Pulavarty wrote:
> >you may want to look into some how eliminating few
> >function pointer de-refs and checks for those who don't care.
> >(#ifdef, unlikely(), or some arch & config magic).
> >  
> >
> I do agree that addidional pointer derefs would be a nightmare
> from the performance perspective. But afaics the patch does not
> add such, and for checks I did already add likeleyness for the non-xip
> case. Could you be more precise and specify which code path(es) you
> mean?

I guess what Badari means is that you could add a function like

#ifdef CONFIG_FS_XIP
static inline int mapping_has_xip(struct address_space *mapping)
{
	return __unlikely(mapping->a_ops->get_xip_page != NULL);
}
#else
#define mapping_has_xip(x) (0)
#endif

Using this in the hot path should result identical binary code to the
current version as long as XIP is not enabled, while otherwise you
need to access four data cache lines every time.

I wouldn't expect much benefit from this since all these cache lines
should be pretty hot and the branch gets predicted correctly anyway,
but it surely doesn't hurt to do the abstraction.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux