Re: avoiding duplicate icache flushing of shared maps on nommu

From: Mike Frysinger
Date: Wed Dec 02 2009 - 16:40:39 EST


On Wed, Dec 2, 2009 at 09:15, David Howells wrote:
> Mike Frysinger wrote:
>> (yes, this now does the icache flush while holding the
>> nommu_region_sem, but i'm interested if the _idea_ is OK)
>
> Yes... ÂBut it's not quite as simple as you think. ÂThe first mapping made of
> a file could be PROT_READ only, in which case a second, executable mapping
> made that shares it would not get flushed from the icache.

that is a tricky edge case ;)

> How about the attached patch?

it works, but i think we want to put the vm_icache_flushed in
linux/mm_types.h behind NOMMU so we dont bloat the MMU guys ?
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/