linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Pankaj Suryawanshi <pankaj.suryawanshi@einfochips.com>,
	Kirill Tkhai <ktkhai@virtuozzo.com>,
	Michal Hocko <mhocko@kernel.org>,
	"aneesh.kumar@linux.ibm.com" <aneesh.kumar@linux.ibm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"minchan@kernel.org" <minchan@kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"khandual@linux.vnet.ibm.com" <khandual@linux.vnet.ibm.com>,
	"hillf.zj@alibaba-inc.com" <hillf.zj@alibaba-inc.com>
Subject: Re: [External] Re: vmscan: Reclaim unevictable pages
Date: Mon, 18 Mar 2019 09:42:50 +0100	[thread overview]
Message-ID: <0b86dbca-cbc9-3b43-e3b9-8876bcc24f22@suse.cz> (raw)
In-Reply-To: <SG2PR02MB3098E6F2C4BAEB56AE071EDCE8440@SG2PR02MB3098.apcprd02.prod.outlook.com>

On 3/15/19 11:11 AM, Pankaj Suryawanshi wrote:
> 
> [ cc Aneesh kumar, Anshuman, Hillf, Vlastimil]

Can you send a proper patch with changelog explaining the change? I
don't know the context of this thread.

> From: Pankaj Suryawanshi
> Sent: 15 March 2019 11:35:05
> To: Kirill Tkhai; Michal Hocko
> Cc: linux-kernel@vger.kernel.org; minchan@kernel.org; linux-mm@kvack.org
> Subject: Re: Re: [External] Re: vmscan: Reclaim unevictable pages
> 
> 
> 
> [ cc linux-mm ]
> 
> 
> From: Pankaj Suryawanshi
> Sent: 14 March 2019 19:14:40
> To: Kirill Tkhai; Michal Hocko
> Cc: linux-kernel@vger.kernel.org; minchan@kernel.org
> Subject: Re: 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,
>                 sc->nr_scanned++;
> 
>                 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);
>                 continue;
> -
> +cull_mlocked:
> +                if (PageSwapCache(page))
> +                        try_to_free_swap(page);
> +                unlock_page(page);
> +                list_add(&page->lru, &ret_pages);
> +                continue;
>  activate_locked:
>                 /* Not a candidate for swapping, so reclaim swap space. */
>                 if (PageSwapCache(page) && (mem_cgroup_swap_full(page) ||
> 
> 
> 
> Regards,
> Pankaj
> 
> 
> From: Kirill Tkhai <ktkhai@virtuozzo.com>
> Sent: 14 March 2019 14:55:34
> To: Pankaj Suryawanshi; Michal Hocko
> Cc: linux-kernel@vger.kernel.org; minchan@kernel.org
> 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.
> 
> See     https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/mm/vmscan.c?h=v4.14.65
> 
> [...]
> 
>>> 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. *************************************************************************************************************************************************************
> 


  parent reply	other threads:[~2019-03-18  8:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SG2PR02MB3098A05E09B0D3F3CB1C3B9BE84B0@SG2PR02MB3098.apcprd02.prod.outlook.com>
     [not found] ` <SG2PR02MB309806967AE91179CAFEC34BE84B0@SG2PR02MB3098.apcprd02.prod.outlook.com>
     [not found]   ` <SG2PR02MB3098B751EC6B8E32806A42FBE84B0@SG2PR02MB3098.apcprd02.prod.outlook.com>
     [not found]     ` <20190314084120.GF7473@dhcp22.suse.cz>
     [not found]       ` <SG2PR02MB309894F6D7DF9148846088F3E84B0@SG2PR02MB3098.apcprd02.prod.outlook.com>
     [not found]         ` <226a92b9-94c5-b859-c54b-3aacad3089cc@virtuozzo.com>
     [not found]           ` <SG2PR02MB3098299456FB6AE2FD822C4CE84B0@SG2PR02MB3098.apcprd02.prod.outlook.com>
     [not found]             ` <SG2PR02MB30988333AD658F8124070ABEE84B0@SG2PR02MB3098.apcprd02.prod.outlook.com>
2019-03-15  6:05               ` Pankaj Suryawanshi
2019-03-15 10:11                 ` Pankaj Suryawanshi
2019-03-18  7:45                   ` Pankaj Suryawanshi
2019-03-18  8:56                     ` Pankaj Suryawanshi
2019-03-18  8:42                   ` Vlastimil Babka [this message]
2019-03-18  9:09                     ` [External] " Pankaj Suryawanshi
2019-03-18  9:33                       ` Kirill Tkhai
2019-03-18  9:43                         ` Pankaj Suryawanshi
2019-03-18  9:47                           ` Kirill Tkhai
2019-03-18  9:59                             ` Pankaj Suryawanshi
2019-03-18 10:38                               ` Kirill Tkhai
2019-03-20  6:48                                 ` Pankaj Suryawanshi
2019-03-26  7:53                                   ` Pankaj Suryawanshi
2019-03-26  9:01                                     ` Michal Hocko
2019-03-26  9:12                                       ` Pankaj Suryawanshi
2019-03-26  9:16                                       ` Pankaj Suryawanshi
2019-03-26  9:36                                         ` Michal Hocko
2019-03-29  5:29                                           ` Pankaj Suryawanshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b86dbca-cbc9-3b43-e3b9-8876bcc24f22@suse.cz \
    --to=vbabka@suse.cz \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=ktkhai@virtuozzo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=pankaj.suryawanshi@einfochips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox