All of lore.kernel.org
 help / color / mirror / Atom feed
From: Soichiro Ueda <the.latticeheart@gmail.com>
To: Liu Shixin <liushixin2@huawei.com>,
	mst@redhat.com, david@redhat.com, jasowang@redhat.com,
	akpm@linux-foundation.org
Cc: virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	kalutes@google.com, mhiramat@kernel.org, cwd@google.com
Subject: Re: [PATCH] virtio_balloon: high order allocation
Date: Thu, 29 Dec 2022 15:27:19 +0900	[thread overview]
Message-ID: <03cb5a7d-a10a-91b0-9e10-6a1147e56963@gmail.com> (raw)
In-Reply-To: <3fabf076-0fd8-2ad2-52e7-3c2913308156@huawei.com>

Hi, Shixin.

Thanks for checking the patch!

>> +			for (i = 0; i < num_pfns; i++) {
>> +				set_page_pfns(vb, vb->pfns + vb->num_pfns + i,
>> +					      nth_page(page, i));
>> +			}
> Since the interval of vb->num_pfns is VIRTIO_BALLOON_PAGES_PER_PAGE,
> it seems that the pfns[] should be vb->pfns + vb->num_pfns + i * VIRTIO_BALLOON_PAGES_PER_PAGE.
Definitely.
>> +			vb->num_pages +=
>> +				num_pfns * VIRTIO_BALLOON_PAGES_PER_PAGE;
>> +			if (!virtio_has_feature(
>> +				    vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
>> +				adjust_managed_page_count(page, -num_pfns);
> num_pfns is of the unsigned int type so need be to converted to long manually.

Oh, the second argument of adjust_managed_page_count is long type. So it 
needs casting as you say.

I'll fix these problems in the v2 patch.

Thank you,



  reply	other threads:[~2022-12-29  6:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  9:35 [PATCH] virtio_balloon: high order allocation Soichiro Ueda
2022-12-23  9:40 ` David Hildenbrand
2022-12-23  9:40   ` David Hildenbrand
2022-12-29  5:31   ` Soichiro Ueda
2023-01-02 11:55     ` David Hildenbrand
2023-01-02 11:55       ` David Hildenbrand
2022-12-24  3:26 ` Liu Shixin
2022-12-29  6:27   ` Soichiro Ueda [this message]
2022-12-23 21:04 kernel test robot

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=03cb5a7d-a10a-91b0-9e10-6a1147e56963@gmail.com \
    --to=the.latticeheart@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cwd@google.com \
    --cc=david@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kalutes@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liushixin2@huawei.com \
    --cc=mhiramat@kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.