Revision e4eed03fd06578571c01d4f1478c874bb432c815 authored by Andrea Arcangeli on 20 June 2012, 19:52:57 UTC, committed by Linus Torvalds on 20 June 2012, 21:39:35 UTC
In the x86 32bit PAE CONFIG_TRANSPARENT_HUGEPAGE=y case while holding the mmap_sem for reading, cmpxchg8b cannot be used to read pmd contents under Xen. So instead of dealing only with "consistent" pmdvals in pmd_none_or_trans_huge_or_clear_bad() (which would be conceptually simpler) we let pmd_none_or_trans_huge_or_clear_bad() deal with pmdvals where the low 32bit and high 32bit could be inconsistent (to avoid having to use cmpxchg8b). The only guarantee we get from pmd_read_atomic is that if the low part of the pmd was found null, the high part will be null too (so the pmd will be considered unstable). And if the low part of the pmd is found "stable" later, then it means the whole pmd was read atomically (because after a pmd is stable, neither MADV_DONTNEED nor page faults can alter it anymore, and we read the high part after the low part). In the 32bit PAE x86 case, it is enough to read the low part of the pmdval atomically to declare the pmd as "stable" and that's true for THP and no THP, furthermore in the THP case we also have a barrier() that will prevent any inconsistent pmdvals to be cached by a later re-read of the *pmd. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: Jonathan Nieder <jrnieder@gmail.com> Cc: Ulrich Obergfell <uobergfe@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Hugh Dickins <hughd@google.com> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Petr Matousek <pmatouse@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Tested-by: Andrew Jones <drjones@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent abca7c4
File | Mode | Size |
---|---|---|
9p | ||
bluetooth | ||
caif | ||
irda | ||
iucv | ||
netfilter | ||
netns | ||
nfc | ||
phonet | ||
sctp | ||
tc_act | ||
act_api.h | -rw-r--r-- | 4.2 KB |
addrconf.h | -rw-r--r-- | 7.7 KB |
af_ieee802154.h | -rw-r--r-- | 1.6 KB |
af_rxrpc.h | -rw-r--r-- | 1.9 KB |
af_unix.h | -rw-r--r-- | 2.0 KB |
ah.h | -rw-r--r-- | 435 bytes |
arp.h | -rw-r--r-- | 1.7 KB |
atmclip.h | -rw-r--r-- | 1.4 KB |
ax25.h | -rw-r--r-- | 15.1 KB |
ax88796.h | -rw-r--r-- | 998 bytes |
cfg80211-wext.h | -rw-r--r-- | 2.0 KB |
cfg80211.h | -rw-r--r-- | 118.2 KB |
checksum.h | -rw-r--r-- | 3.1 KB |
cipso_ipv4.h | -rw-r--r-- | 7.9 KB |
cls_cgroup.h | -rw-r--r-- | 1.4 KB |
codel.h | -rw-r--r-- | 10.3 KB |
compat.h | -rw-r--r-- | 2.1 KB |
datalink.h | -rw-r--r-- | 482 bytes |
dcbevent.h | -rw-r--r-- | 1.3 KB |
dcbnl.h | -rw-r--r-- | 4.1 KB |
dn.h | -rw-r--r-- | 7.0 KB |
dn_dev.h | -rw-r--r-- | 5.4 KB |
dn_fib.h | -rw-r--r-- | 4.6 KB |
dn_neigh.h | -rw-r--r-- | 824 bytes |
dn_nsp.h | -rw-r--r-- | 6.0 KB |
dn_route.h | -rw-r--r-- | 4.3 KB |
dsa.h | -rw-r--r-- | 4.7 KB |
dsfield.h | -rw-r--r-- | 1.1 KB |
dst.h | -rw-r--r-- | 10.9 KB |
dst_ops.h | -rw-r--r-- | 1.7 KB |
esp.h | -rw-r--r-- | 434 bytes |
ethoc.h | -rw-r--r-- | 502 bytes |
fib_rules.h | -rw-r--r-- | 3.0 KB |
flow.h | -rw-r--r-- | 5.7 KB |
flow_keys.h | -rw-r--r-- | 319 bytes |
garp.h | -rw-r--r-- | 2.6 KB |
gen_stats.h | -rw-r--r-- | 1.7 KB |
genetlink.h | -rw-r--r-- | 9.2 KB |
gre.h | -rw-r--r-- | 410 bytes |
icmp.h | -rw-r--r-- | 1.5 KB |
ieee80211_radiotap.h | -rw-r--r-- | 10.0 KB |
ieee802154.h | -rw-r--r-- | 5.6 KB |
ieee802154_netdev.h | -rw-r--r-- | 3.8 KB |
if_inet6.h | -rw-r--r-- | 5.7 KB |
inet6_connection_sock.h | -rw-r--r-- | 1.4 KB |
inet6_hashtables.h | -rw-r--r-- | 3.4 KB |
inet_common.h | -rw-r--r-- | 1.5 KB |
inet_connection_sock.h | -rw-r--r-- | 10.7 KB |
inet_ecn.h | -rw-r--r-- | 3.3 KB |
inet_frag.h | -rw-r--r-- | 2.0 KB |
inet_hashtables.h | -rw-r--r-- | 13.3 KB |
inet_sock.h | -rw-r--r-- | 6.2 KB |
inet_timewait_sock.h | -rw-r--r-- | 6.7 KB |
inetpeer.h | -rw-r--r-- | 3.1 KB |
ip.h | -rw-r--r-- | 13.4 KB |
ip6_checksum.h | -rw-r--r-- | 2.3 KB |
ip6_fib.h | -rw-r--r-- | 6.4 KB |
ip6_route.h | -rw-r--r-- | 5.1 KB |
ip6_tunnel.h | -rw-r--r-- | 879 bytes |
ip_fib.h | -rw-r--r-- | 7.1 KB |
ip_vs.h | -rw-r--r-- | 41.7 KB |
ipcomp.h | -rw-r--r-- | 620 bytes |
ipconfig.h | -rw-r--r-- | 772 bytes |
ipip.h | -rw-r--r-- | 1.7 KB |
ipv6.h | -rw-r--r-- | 18.8 KB |
ipx.h | -rw-r--r-- | 3.7 KB |
iw_handler.h | -rw-r--r-- | 21.6 KB |
lapb.h | -rw-r--r-- | 4.9 KB |
lib80211.h | -rw-r--r-- | 4.1 KB |
llc.h | -rw-r--r-- | 4.5 KB |
llc_c_ac.h | -rw-r--r-- | 10.1 KB |
llc_c_ev.h | -rw-r--r-- | 11.6 KB |
llc_c_st.h | -rw-r--r-- | 1.7 KB |
llc_conn.h | -rw-r--r-- | 4.1 KB |
llc_if.h | -rw-r--r-- | 3.0 KB |
llc_pdu.h | -rw-r--r-- | 14.2 KB |
llc_s_ac.h | -rw-r--r-- | 1.6 KB |
llc_s_ev.h | -rw-r--r-- | 2.3 KB |
llc_s_st.h | -rw-r--r-- | 941 bytes |
llc_sap.h | -rw-r--r-- | 1.2 KB |
mac80211.h | -rw-r--r-- | 149.5 KB |
mac802154.h | -rw-r--r-- | 4.9 KB |
mip6.h | -rw-r--r-- | 1.6 KB |
mld.h | -rw-r--r-- | 1.9 KB |
ndisc.h | -rw-r--r-- | 4.4 KB |
neighbour.h | -rw-r--r-- | 10.9 KB |
net_namespace.h | -rw-r--r-- | 7.0 KB |
net_ratelimit.h | -rw-r--r-- | 181 bytes |
netdma.h | -rw-r--r-- | 1.2 KB |
netevent.h | -rw-r--r-- | 696 bytes |
netlabel.h | -rw-r--r-- | 17.2 KB |
netlink.h | -rw-r--r-- | 32.0 KB |
netprio_cgroup.h | -rw-r--r-- | 1.8 KB |
netrom.h | -rw-r--r-- | 8.0 KB |
nexthop.h | -rw-r--r-- | 821 bytes |
nl802154.h | -rw-r--r-- | 4.5 KB |
p8022.h | -rw-r--r-- | 441 bytes |
ping.h | -rw-r--r-- | 1.4 KB |
pkt_cls.h | -rw-r--r-- | 9.1 KB |
pkt_sched.h | -rw-r--r-- | 3.3 KB |
protocol.h | -rw-r--r-- | 3.7 KB |
psnap.h | -rw-r--r-- | 326 bytes |
raw.h | -rw-r--r-- | 1.9 KB |
rawv6.h | -rw-r--r-- | 559 bytes |
red.h | -rw-r--r-- | 10.0 KB |
regulatory.h | -rw-r--r-- | 4.3 KB |
request_sock.h | -rw-r--r-- | 6.6 KB |
rose.h | -rw-r--r-- | 7.9 KB |
route.h | -rw-r--r-- | 9.4 KB |
rtnetlink.h | -rw-r--r-- | 4.6 KB |
sch_generic.h | -rw-r--r-- | 16.5 KB |
scm.h | -rw-r--r-- | 3.1 KB |
secure_seq.h | -rw-r--r-- | 819 bytes |
slhc_vj.h | -rw-r--r-- | 6.6 KB |
snmp.h | -rw-r--r-- | 5.9 KB |
sock.h | -rw-r--r-- | 60.8 KB |
stp.h | -rw-r--r-- | 358 bytes |
tcp.h | -rw-r--r-- | 48.7 KB |
tcp_memcontrol.h | -rw-r--r-- | 677 bytes |
tcp_states.h | -rw-r--r-- | 1.2 KB |
timewait_sock.h | -rw-r--r-- | 1.4 KB |
transp_v6.h | -rw-r--r-- | 1.4 KB |
udp.h | -rw-r--r-- | 8.3 KB |
udplite.h | -rw-r--r-- | 3.7 KB |
wext.h | -rw-r--r-- | 1.5 KB |
wimax.h | -rw-r--r-- | 20.1 KB |
wpan-phy.h | -rw-r--r-- | 2.6 KB |
x25.h | -rw-r--r-- | 9.7 KB |
x25device.h | -rw-r--r-- | 348 bytes |
xfrm.h | -rw-r--r-- | 46.4 KB |
Computing file changes ...