[lkml]   [2019]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: Re: [External] Re: vmscan: Reclaim unevictable pages

Hello ,

Please ignore the curly braces, they are just for debugging.

Below is the updated patch.

diff --git a/mm/vmscan.c b/mm/vmscan.c
index be56e2e..12ac353 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -998,7 +998,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,

if (unlikely(!page_evictable(page)))
- goto activate_locked;
+ goto cull_mlocked;

if (!sc->may_unmap && page_mapped(page))
goto keep_locked;
@@ -1331,7 +1331,12 @@ static unsigned long shrink_page_list(struct list_head *page_list,
} else
list_add(&page->lru, &free_pages);
+ if (PageSwapCache(page))
+ try_to_free_swap(page);
+ unlock_page(page);
+ list_add(&page->lru, &ret_pages);
+ continue;
/* Not a candidate for swapping, so reclaim swap space. */
if (PageSwapCache(page) && (mem_cgroup_swap_full(page) ||


From: Kirill Tkhai <>
Sent: 14 March 2019 14:55:34
To: Pankaj Suryawanshi; Michal Hocko
Subject: Re: Re: [External] Re: vmscan: Reclaim unevictable pages

On 14.03.2019 11:52, Pankaj Suryawanshi wrote:
> I am using kernel version 4.14.65 (on Android pie [ARM]).
> No additional patches applied on top of vanilla.(Core MM).
> If I change in the vmscan.c as below patch, it will work.

Sorry, but 4.14.65 does not have braces around trylock_page(),
like in your patch below.



>> diff --git a/mm/vmscan.c b/mm/vmscan.c
>> index be56e2e..2e51edc 100644
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -990,15 +990,17 @@ static unsigned long shrink_page_list(struct list_head *page_list,
>> page = lru_to_page(page_list);
>> list_del(&page->lru);
>> if (!trylock_page(page)) {
>> goto keep;
>> }

************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************
 \ /
  Last update: 2019-03-14 14:45    [W:0.154 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site