linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Marc Lehmann <schmorp@schmorp.de>
Cc: linux-mm@kvack.org
Subject: Re: post linux 4.4 vm oom kill, lockup and thrashing woes
Date: Wed, 18 Jul 2018 10:38:08 +0200	[thread overview]
Message-ID: <20180718083808.GR7193@dhcp22.suse.cz> (raw)
In-Reply-To: <20180717234549.4ng2expfkgaranuq@schmorp.de>

On Wed 18-07-18 01:45:49, Marc Lehmann wrote:
> On Tue, Jul 10, 2018 at 02:32:22PM +0200, Michal Hocko <mhocko@kernel.org> wrote:
> > then we are out of luck. It is quite unfortunate that nvidia really
> > insists on having order-3 allocation. Maybe it can use kvmalloc or use
> > __GFP_RETRY_MAYFAIL in current kernels.
> 
> Please note that nvidia is really just one of many causes. For example,
> right now, on one of our company servers with 25GB of available RAM and
> no nvidia driver on linux 4.14.43, I couldn't start any kvm until I did a
> manual cache flush:
> 
>    ~# vmctl start ...
>    ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory
>    failed to initialize KVM: Cannot allocate memory
>    ~# free
>                  total        used        free      shared  buff/cache   available
>    Mem:       32619348     6712028      989540       21652    24917780    25430736
>    Swap:      33554428      249676    33304752
>    ~# sync; echo 3 >/proc/sys/vm/drop_caches
>    ~# vmctl start ...
>    [successful]
> 
> reason was an order-6 allocation by kvm:
> 
> http://data.plan9.de/kvm_oom.txt

That is something to bring up with kvm guys. Order-6 pages are
considered costly and success of the allocation is by no means
guaranteed. Unike for orders smaller than 4 they do not trigger the oom
killer though.

If kvm doesn't really require the physically contiguous memory then
vmalloc fallback would be a good alternative. Unfortunatelly I am not
able to find which allocation is that. What does faddr2line kvm_dev_ioctl_create_vm+0x40
say?
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-07-18  8:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 12:07 Marc Lehmann
2018-07-10 12:32 ` Michal Hocko
2018-07-17 23:45   ` Marc Lehmann
2018-07-18  8:38     ` Michal Hocko [this message]
2018-07-22 23:34       ` Marc Lehmann
2018-07-23 12:55         ` Michal Hocko
2018-07-31  3:45           ` Marc Lehmann
2018-07-31  7:28             ` Michal Hocko

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=20180718083808.GR7193@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schmorp@schmorp.de \
    /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