Re: [PATCH 4/4] powerpc/64s: Support shrinking the SLB for debugging
flat view
From: Nicholas Piggin <npiggin@gmail.com>
Date: 2019-01-23 08:42:00
Michael Ellerman's on January 19, 2019 8:27 pm:
Michal Suchánek [off-list ref] writes:quoted
On Thu, 17 Jan 2019 23:13:28 +1100 Michael Ellerman [off-list ref] wrote:quoted
On machines with 1TB segments and a 32-entry SLB it's quite hard to cause sufficient SLB pressure to trigger bugs caused due to badly timed SLB faults. We have seen this in the past and a few years ago added the disable_1tb_segments command line option to force the use of 256MB segments. However even this allows some bugs to slip through testing if the SLB entry in question was recently accessed. So add a new command line parameter for debugging which shrinks the SLB to the minimum size we can support. Currently that size is 3, two bolted SLBs and 1 for dynamic use. This creates the maximal SLBDoesn't this violate the power of 2 requirement stated in 2/4?Yes. Good point. This was originally a hack patch in my tree, back when SLB_NUM_BOLTED was 3 and before Nick even added the slb_used_bitmap, so back then it was a power of 2 but it also didn't matter :) I think I'll rework the slb_full_bitmap patch anyway and remove the power of 2 requirement, so then this patch will be OK.
Thanks, good patch and really will help testing. Sometimes even if you can get enough pressure with the 256MB segments, you actually want to test 1TB segment code paths too. Thanks, Nick