xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v3] xen/balloon: add late_initcall_sync() for initial ballooning done
Date: Sat, 30 Oct 2021 00:18:42 +0200	[thread overview]
Message-ID: <YXxzQhPvgAOkhGg/@mail-itl> (raw)
In-Reply-To: <11956c14-f1f7-70f0-40a6-aad31a264af6@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]

On Fri, Oct 29, 2021 at 05:46:18PM -0400, Boris Ostrovsky wrote:
> 
> On 10/29/21 10:20 AM, Juergen Gross wrote:
> > --- a/Documentation/ABI/stable/sysfs-devices-system-xen_memory
> > +++ b/Documentation/ABI/stable/sysfs-devices-system-xen_memory
> > @@ -84,3 +84,13 @@ Description:
> >   		Control scrubbing pages before returning them to Xen for others domains
> >   		use. Can be set with xen_scrub_pages cmdline
> >   		parameter. Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
> > +
> > +What:		/sys/devices/system/xen_memory/xen_memory0/boot_timeout
> > +Date:		November 2021
> > +KernelVersion:	5.16
> > +Contact:	xen-devel@lists.xenproject.org
> > +Description:
> > +		The time (in seconds) to wait before giving up to boot in case
> > +		initial ballooning fails to free enough memory. Applies only
> > +		when running as HVM or PVH guest and started with less memory
> > +		configured than allowed at max.
> 
> 
> How is this going to be used? We only need this during boot.
> 
> 
> > -		state = update_schedule(state);
> > +		balloon_state = update_schedule(balloon_state);
> 
> 
> Now that balloon_state has whole file scope it can probably be updated inside update_schedule().
> 
> 
> > +	while ((credit = current_credit()) < 0) {
> > +		if (credit != last_credit) {
> > +			last_changed = jiffies;
> > +			last_credit = credit;
> > +		}
> > +		if (balloon_state == BP_ECANCELED) {
> 
> 
> What about other states? We are really waiting for BP_DONE, aren't we?

BP_DONE is set also as an intermediate step:

                       balloon_state = decrease_reservation(n_pages,
                                                            GFP_BALLOON);
                       if (balloon_state == BP_DONE && n_pages != -credit &&
                            n_pages < totalreserve_pages)
                               balloon_state = BP_EAGAIN;

It would be bad to finish waiting in this case.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-10-29 22:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 14:20 [PATCH v3] xen/balloon: add late_initcall_sync() for initial ballooning done Juergen Gross
2021-10-29 21:46 ` Boris Ostrovsky
2021-10-29 22:18   ` Marek Marczykowski-Górecki [this message]
2021-10-29 23:44     ` Boris Ostrovsky
2021-11-01  7:21       ` Juergen Gross
2021-11-01  7:15   ` Juergen Gross

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=YXxzQhPvgAOkhGg/@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.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 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).