Re: [PATCH net-next v5 01/13] mm: page_frag: add a test module for page_frag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024/5/30 8:29, Jakub Kicinski wrote:
> On Tue, 28 May 2024 20:55:51 +0800 Yunsheng Lin wrote:
>> Basing on the lib/objpool.c, change it to something like a
>> ptrpool, so that we can utilize that to test the correctness
>> and performance of the page_frag.
>>
>> The testing is done by ensuring that the fragments allocated
>> from a frag_frag_cache instance is pushed into a ptrpool
>> instance in a kthread binded to a specified cpu, and a kthread
>> binded to a specified cpu will pop the fragmemt from the
> 
> fragment
> 
>> ptrpool and free the fragmemt.
>>
>> We may refactor out the common part between objpool and ptrpool
>> if this ptrpool thing turns out to be helpful for other place.
> 
> Is this test actually meaningfully testing page_frag or rather
> the objpool construct and the scheduler? :S

For the objpool part, I guess it is ok to say that it is a
meaningfully testing for both page_frag and objpool if there is
changing to either of them.

For the scheduler part, this test provides the below module param
to avoid the the noise from scheduler.

+static int test_push_cpu;
+module_param(test_push_cpu, int, 0600);
+MODULE_PARM_DESC(test_push_cpu, "test cpu for pushing fragment");
+
+static int test_pop_cpu;
+module_param(test_pop_cpu, int, 0600);
+MODULE_PARM_DESC(test_pop_cpu, "test cpu for popping fragment");

Or is there any better idea for testing page_frag?

Thanks for taking a look.

> 
> .
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux