]> git.baikalelectronics.ru Git - kernel.git/commit
perf_counter, x86: Improve interactions with fast-gup
authorIngo Molnar <mingo@elte.hu>
Mon, 15 Jun 2009 09:35:01 +0000 (11:35 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 19 Jun 2009 14:55:16 +0000 (16:55 +0200)
commita0f0682ca0de0532be207936ccff3a9888f9b2f8
tree0382a5fbe462f5a88056b3f4e7b460e82f4795bb
parent3babc20d31045bba35079957961d6bad4c94d659
perf_counter, x86: Improve interactions with fast-gup

Improve a few details in perfcounter call-chain recording that
makes use of fast-GUP:

- Use ACCESS_ONCE() to observe the pte value. ptes are fundamentally
  racy and can be changed on another CPU, so we have to be careful
  about how we access them. The PAE branch is already careful with
  read-barriers - but the non-PAE and 64-bit side needs an
  ACCESS_ONCE() to make sure the pte value is observed only once.

- make the checks a bit stricter so that we can feed it any kind of
  cra^H^H^H user-space input ;-)

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/uaccess.h
arch/x86/mm/gup.c