diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2019-07-03 22:34:01 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-07-04 22:27:25 +1000 |
commit | 18a593c8b5426f6a08bcb353636d761a83f78d9e (patch) | |
tree | f12ab26568d0b44e9161f6a662d9f11e93b200b4 /arch/powerpc/platforms/pseries/setup.c | |
parent | d62c8deeb6e69cd7815c21171a218301822e4a06 (diff) | |
download | linux-stable-18a593c8b5426f6a08bcb353636d761a83f78d9e.tar.gz linux-stable-18a593c8b5426f6a08bcb353636d761a83f78d9e.tar.bz2 linux-stable-18a593c8b5426f6a08bcb353636d761a83f78d9e.zip |
powerpc/pseries: Protect against hogging the cpu while setting up the stats
When enabling or disabling the vcpu dispatch statistics, we do a lot of
work including allocating/deallocating memory across all possible cpus
for the DTL buffer. In order to guard against hogging the cpu for too
long, track the time we're taking and yield the processor if necessary.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 9d106494cc2d..cb418d2bb1ac 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -285,7 +285,7 @@ static int alloc_dispatch_logs(void) if (!dtl_cache) return 0; - alloc_dtl_buffers(); + alloc_dtl_buffers(0); /* Register the DTL for the current (boot) cpu */ register_dtl_buffer(smp_processor_id()); |