linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: TGSP <tgsp002@gmail.com>
Cc: rafael@kernel.org, len.brown@intel.com, pavel@ucw.cz,
	huanglei@kylinos.cn, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, xiongxin <xiongxin@kylinos.cn>,
	stable@vger.kernel.org
Subject: Re: [PATCH -next 2/2] PM: hibernate: add check of preallocate mem for image size pages
Date: Thu, 3 Nov 2022 18:11:22 +0100	[thread overview]
Message-ID: <CAJZ5v0gWBfL4y6RAhDHMx2tbGDFppLJdjb2TFU1aEPn3d+FJqQ@mail.gmail.com> (raw)
In-Reply-To: <20221101022840.1351163-3-tgsp002@gmail.com>

On Tue, Nov 1, 2022 at 3:28 AM TGSP <tgsp002@gmail.com> wrote:
>
> From: xiongxin <xiongxin@kylinos.cn>
>
> Added a check on the return value of preallocate_image_highmem(). If
> memory preallocate is insufficient, S4 cannot be done;
>
> I am playing 4K video on a machine with AMD or other graphics card and
> only 8GiB memory, and the kernel is not configured with CONFIG_HIGHMEM.
> When doing the S4 test, the analysis found that when the pages get from
> minimum_image_size() is large enough, The preallocate_image_memory() and
> preallocate_image_highmem() calls failed to obtain enough memory. Add
> the judgment that memory preallocate is insufficient;

So I'm not sure what the problem is.  Can you please explain it in more detail?

The if (pages < alloc) appears to be false in your case, so there
should be enough free pages to create an image.

Maybe reserved_size is too low?

      parent reply	other threads:[~2022-11-03 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01  2:28 [PATCH -next 0/2] Fixes to the hibernate_preallocate_memory() TGSP
2022-11-01  2:28 ` [PATCH -next 1/2] PM: hibernate: fix spelling mistake for annotation TGSP
2022-11-01 12:45   ` Bagas Sanjaya
2022-11-03 16:25   ` Rafael J. Wysocki
2022-11-04  7:31     ` TGSP
2022-11-05 18:09       ` Rafael J. Wysocki
2022-11-01  2:28 ` [PATCH -next 2/2] PM: hibernate: add check of preallocate mem for image size pages TGSP
2022-11-01 21:23   ` kernel test robot
2022-11-03 16:47   ` Rafael J. Wysocki
2022-11-03 16:57     ` Rafael J. Wysocki
2022-11-03 17:11   ` Rafael J. Wysocki [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=CAJZ5v0gWBfL4y6RAhDHMx2tbGDFppLJdjb2TFU1aEPn3d+FJqQ@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=huanglei@kylinos.cn \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=stable@vger.kernel.org \
    --cc=tgsp002@gmail.com \
    --cc=xiongxin@kylinos.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;
as well as URLs for NNTP newsgroup(s).