Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 19 Oct 2012 11:48:13 -0700 | Subject | Re: [PATCH] percpu-rwsem: use barrier in unlock path |
| |
On Thu, Oct 18, 2012 at 9:00 AM, Mikulas Patocka <mpatocka@redhat.com> wrote: > > What is the procedure for making changes that require support of > architectures? It is trivial to make a patch that moves this into > arch-specific includes, the problem is that the patch break all the > architectures - I wrote support for x86, sparc, parisc, alpha (I can test > those) but not the others.
We'd need to add it to everybody.
It shouldn't need per-architecture testing - since "smp_mb()" is always safe. So we could just make all architectures default to that, and then for x86 (and potentially others that have cheaper models for release-consistency) just do the optimized one.
We *could* also simply do something like
#ifndef smp_release_before_store #define smp_release_before_store() smp_mb() #endif
and basically make the rule be that only architectures that have a cheaper one need to define it at all. That may be the correct short-term fix, since there initially would be only a single user.
Linus
| |