[PATCH] arm: align shared memory unconditionally to the SHMLBA boundary

Cyrill Gorcunov gorcunov at gmail.com
Mon Jul 15 14:57:39 EDT 2013

On Mon, Jul 15, 2013 at 07:08:46PM +0100, Russell King - ARM Linux wrote:
> On Mon, Jul 15, 2013 at 09:32:38PM +0400, Cyrill Gorcunov wrote:
> > On Tue, Feb 19, 2013 at 10:11:09AM +0400, Alexander Kartashov wrote:
> > > Currently IPC SHM works in a strange way on ARM:
> > > the syscall sys_shmat() requires the argument shmaddr
> > > be SHMLBA-aligned (ARM has the macro __ARCH_FORCE_SHMLBA
> > > unconditionally defined) but allocates memory that
> > > isn't SHMLBA-aligned because the value of memory alignment
> > > depends on presense of certain cache aliases.
> > 
> > Hi guys, is there some conclusion on this patch? It has been sent
> > almost 5 months back ;)
> It's pointless.  The alignment is only required for CPUs which have
> aliasing caches.  What the code does in mmap() is correct.  However,
> we can't dynamically select this in the SHM code.

Hi Russell, thanks a lot for reply! I must admit I'm not that familiar
with arm hw internals, but if the behaviour is correct than we've a
problem with checkpoint/restore procedure on arm platform :( As far
as I know Alexander pointed me that he find no other way of fixing
the problem except patching the kernel. Alexander, mind to remind
where exactly we're failing in c/r procedure, thus maybe arm guys
would help us to find a way to pass it by with some user-space

More information about the linux-arm-kernel mailing list