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

Re: O_SYNC patch -> slow fb memory access



Thomas Winischhofer writes:
 > 
 > Egbert, Debian folks:
 > 
 > After the release of XFree86 4.3.0, (AFAIK) Egbert Eich commited a patch 
 > which set the O_SYNC flag when opening /dev/mem for framebuffer memory 
 > access.
 > 
 > This caused memory access to the framebuffer area to become terribly 
 > slow on some machines. Among these types of machines are practically all 
 > SiS based ones using a shared memory area for framebuffer memory.
 > 
 > It seems the Debian folks have included this patch in their experimental 
 > pre1 prerelease, as I experience severe performance regressions compared 
 > to plain 4.3 from XFree.org.
 > 
 > Egbert: What exactly did that patch, what file is affected, and when was 
 > this reverted (I know it's not in current HEAD)?

No, I removed it again. O_SYNC causes the memory to be mapped
uncached. I had a system which crashed horribly when this flag
was not set for MMIO. Now I believe the system itself was faulty.
I'm still not sure if caching should be set at all for MMIO registers,
however since O_SYNC is an open() syscall flag and there is no
way of asking for uncached mempry mapping when doing mmap() we'd
have to have two separate file handles.
The affected file was os-support/linux/lnx_video.c

Egbert.



Reply to: