Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-17 Thread Joonsoo Kim
2015-03-18 6:58 GMT+09:00 Andrew Morton : > On Tue, 17 Mar 2015 17:22:46 +0900 Roman Peniaev wrote: > >> >> My second patch fixes this problem. >> >> I occupy the block on allocation and avoid jumping to the search loop. >> > >> > I'm not sure that this fixes above case. >> > 'vm_map_ram (3) * 85'

Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-17 Thread Joonsoo Kim
2015-03-17 17:22 GMT+09:00 Roman Peniaev : > On Tue, Mar 17, 2015 at 4:29 PM, Joonsoo Kim wrote: >> On Tue, Mar 17, 2015 at 02:12:14PM +0900, Roman Peniaev wrote: >>> On Tue, Mar 17, 2015 at 1:56 PM, Joonsoo Kim wrote: >>> > On Fri, Mar 13, 2015 at 09:12:55PM +0900, Roman Pen wrote: >>> >> If sui

Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-17 Thread Andrew Morton
On Tue, 17 Mar 2015 17:22:46 +0900 Roman Peniaev wrote: > >> My second patch fixes this problem. > >> I occupy the block on allocation and avoid jumping to the search loop. > > > > I'm not sure that this fixes above case. > > 'vm_map_ram (3) * 85' means 85 times vm_map_ram() calls. > > > > First

Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-17 Thread Roman Peniaev
On Tue, Mar 17, 2015 at 4:29 PM, Joonsoo Kim wrote: > On Tue, Mar 17, 2015 at 02:12:14PM +0900, Roman Peniaev wrote: >> On Tue, Mar 17, 2015 at 1:56 PM, Joonsoo Kim wrote: >> > On Fri, Mar 13, 2015 at 09:12:55PM +0900, Roman Pen wrote: >> >> If suitable block can't be found, new block is allocate

Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-17 Thread Joonsoo Kim
On Tue, Mar 17, 2015 at 02:12:14PM +0900, Roman Peniaev wrote: > On Tue, Mar 17, 2015 at 1:56 PM, Joonsoo Kim wrote: > > On Fri, Mar 13, 2015 at 09:12:55PM +0900, Roman Pen wrote: > >> If suitable block can't be found, new block is allocated and put into a > >> head > >> of a free list, so on nex

Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-16 Thread Roman Peniaev
On Tue, Mar 17, 2015 at 1:56 PM, Joonsoo Kim wrote: > On Fri, Mar 13, 2015 at 09:12:55PM +0900, Roman Pen wrote: >> If suitable block can't be found, new block is allocated and put into a head >> of a free list, so on next iteration this new block will be found first. >> >> That's bad, because old

Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-16 Thread Joonsoo Kim
On Fri, Mar 13, 2015 at 09:12:55PM +0900, Roman Pen wrote: > If suitable block can't be found, new block is allocated and put into a head > of a free list, so on next iteration this new block will be found first. > > That's bad, because old blocks in a free list will not get a chance to be > full

[PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator

2015-03-13 Thread Roman Pen
If suitable block can't be found, new block is allocated and put into a head of a free list, so on next iteration this new block will be found first. That's bad, because old blocks in a free list will not get a chance to be fully used, thus fragmentation will grow. Let's consider this simple exam