linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	cgel.zte@gmail.com,  naoya.horiguchi@nec.com, minchan@kernel.org,
	hannes@cmpxchg.org,  rogerq@kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  guo.ziliang@zte.com.cn,
	Zeal Robot <zealci@zte.com.cn>,
	 Ran Xiaokai <ran.xiaokai@zte.com.cn>,
	 Jiang Xuexin <jiang.xuexin@zte.com.cn>,
	Yang Yang <yang.yang29@zte.com.cn>
Subject: Re: [PATCH linux-next] mm: swap: get rid of deadloop in swapin readahead
Date: Wed, 2 Mar 2022 12:38:00 -0800 (PST)	[thread overview]
Message-ID: <94de248f-94fa-91d-eb80-2ea75548282d@google.com> (raw)
In-Reply-To: <Yh889CjjSxigdEAY@dhcp22.suse.cz>

On Wed, 2 Mar 2022, Michal Hocko wrote:
> 
> I might be really missing something but I really do not see how is this
> any different from the page allocator path which only does cond_resched
> as well (well, except for throttling but that might just not trigger).
> Or other paths which just do cond_resched while waiting for a progress
> somewhere else.
> 
> Not that I like this situation but !PREEMPT kernel with RT priority
> tasks is rather limited and full of potential priblems IMHO.

As I said in previous mail, I have really not given this as much
thought this time as I did in the 2018 mail thread linked there;
but have seen that it behaves more badly than I had imagined, in
any preemptive kernel - no need for RT.  We just don't have the
stats to show when this code here spins waiting on code elsewhere
that is sleeping.  I think the difference from most cond_resched()
places is that swapin is trying to collect together several factors
with minimal locking, and we should have added preempt_disable()s
when preemption was invented.  But it's only swap so we didn't notice.

Hugh


      reply	other threads:[~2022-03-02 20:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 11:17 cgel.zte
2022-02-26  1:24 ` Andrew Morton
2022-03-01  4:07   ` Hugh Dickins
2022-03-02  0:32     ` Andrew Morton
2022-03-02 19:31       ` Hugh Dickins
2022-02-28  7:57 ` Michal Hocko
2022-02-28 15:33   ` Andrew Morton
2022-03-02  9:46     ` Michal Hocko
2022-03-02 20:38       ` Hugh Dickins [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=94de248f-94fa-91d-eb80-2ea75548282d@google.com \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgel.zte@gmail.com \
    --cc=guo.ziliang@zte.com.cn \
    --cc=hannes@cmpxchg.org \
    --cc=jiang.xuexin@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=ran.xiaokai@zte.com.cn \
    --cc=rogerq@kernel.org \
    --cc=yang.yang29@zte.com.cn \
    --cc=zealci@zte.com.cn \
    /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