linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: js1304@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@surriel.com>,
	Minchan Kim <minchan.kim@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	kernel-team@lge.com, Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH for v5.8 3/3] mm/memory: fix IO cost for anonymous page
Date: Mon, 29 Jun 2020 12:27:20 +0200	[thread overview]
Message-ID: <882baec9-6d8e-55e9-ef67-67266458cbe0@suse.cz> (raw)
In-Reply-To: <1592288204-27734-4-git-send-email-iamjoonsoo.kim@lge.com>

On 6/16/20 8:16 AM, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> 
> With synchronous IO swap device, swap-in is directly handled in fault
> code. Since IO cost notation isn't added there, with synchronous IO swap
> device, LRU balancing could be wrongly biased. Fix it to count it
> in fault code.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/memory.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/mm/memory.c b/mm/memory.c
> index bc6a471..3359057 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3143,6 +3143,14 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
>  				if (err)
>  					goto out_page;
>  
> +				/*
> +				 * XXX: Move to lru_cache_add() when it
> +				 * supports new vs putback
> +				 */
> +				spin_lock_irq(&page_pgdat(page)->lru_lock);
> +				lru_note_cost_page(page);
> +				spin_unlock_irq(&page_pgdat(page)->lru_lock);
> +
>  				lru_cache_add(page);
>  				swap_readpage(page, true);
>  			}
> 


      parent reply	other threads:[~2020-06-29 21:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16  6:16 [PATCH for v5.8 0/3] fix for "mm: balance LRU lists based on relative thrashing" patchset js1304
2020-06-16  6:16 ` [PATCH for v5.8 1/3] mm: workingset: age nonresident information alongside anonymous pages js1304
2020-06-29 10:10   ` Vlastimil Babka
2020-06-16  6:16 ` [PATCH for v5.8 2/3] mm/swap: fix for "mm: workingset: age nonresident information alongside anonymous pages" js1304
2020-06-16 14:48   ` Johannes Weiner
2020-06-16 18:36   ` Andrew Morton
2020-06-17  5:08     ` Joonsoo Kim
2020-06-29 10:25   ` Vlastimil Babka
2020-06-16  6:16 ` [PATCH for v5.8 3/3] mm/memory: fix IO cost for anonymous page js1304
2020-06-16 14:50   ` Johannes Weiner
2020-06-29 10:27   ` Vlastimil Babka [this message]

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=882baec9-6d8e-55e9-ef67-67266458cbe0@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=js1304@gmail.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan.kim@gmail.com \
    --cc=riel@surriel.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;
as well as URLs for NNTP newsgroup(s).