* Re: Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?
2020-06-30 6:51 Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux? 孙世龙 sunshilong
@ 2020-07-02 8:29 ` Mulyadi Santosa
2020-07-03 4:58 ` Valdis Klētnieks
2020-07-03 5:20 ` 孙世龙 sunshilong
1 sibling, 1 reply; 4+ messages in thread
From: Mulyadi Santosa @ 2020-07-02 8:29 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 917 bytes --]
On Tue, Jun 30, 2020 at 1:52 PM 孙世龙 sunshilong <sunshilong369@gmail.com>
wrote:
> Hi, list
> Is there some method or software that could purposely generate a lot
> of physical memory fragmentations on Linux?
>
> I need to do some tests under such circumstances.
>
> Thank you for your attention to this matter.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
Hi
Just pseudo idea, if this is in user space, try to: allocate many blocks
of memory using malloc, each having different size, keep the returned
pointer, then randomly free() some of them, then malloc() again with
different size
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
[-- Attachment #1.2: Type: text/html, Size: 1698 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?
2020-06-30 6:51 Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux? 孙世龙 sunshilong
2020-07-02 8:29 ` Mulyadi Santosa
@ 2020-07-03 5:20 ` 孙世龙 sunshilong
1 sibling, 0 replies; 4+ messages in thread
From: 孙世龙 sunshilong @ 2020-07-03 5:20 UTC (permalink / raw)
To: Kernelnewbies, Valdis Klētnieks, mulyadi.santosa
[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]
Hi, Valdis Klētnieks, Mulyadi Santosa
Thanks to both of you.
>> Just pseudo idea, if this is in user space, try to: allocate many blocks
>> of memory using malloc, each having different size, keep the returned
>> pointer, then randomly free() some of them, then malloc() again with
>> different size
>That will cause userspace malloc() to have fragmentation, but as far
>as the kernel is concerned it's all just 4K pages of user memory.
>Causing physical memory fragmentation will require abusing the kernel
>memory allocators such as kmalloc() and vmalloc() and friends.
I fully understand what you mean by "cause userspace malloc() to have
fragmentation".
I am sorry, maybe I mislead you. I just want there are no available free
high order blocks(i.e
32KB,64KB, 128KB and etc) on the platform.
How can I more efficiently and automatically achieve this goal?
[-- Attachment #1.2: Type: text/html, Size: 1011 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 4+ messages in thread