linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tianyu Lan <Tianyu.Lan@microsoft.com>
To: vkuznets <vkuznets@redhat.com>,
	"lantianyu1986@gmail.com" <lantianyu1986@gmail.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"sashal@kernel.org" <sashal@kernel.org>,
	Michael Kelley <mikelley@microsoft.com>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"eric.devolder@oracle.com" <eric.devolder@oracle.com>
Subject: RE: [EXTERNAL] Re: [RFC PATCH 4/4] x86/Hyper-V: Add memory hot remove function
Date: Thu, 12 Dec 2019 13:37:43 +0000	[thread overview]
Message-ID: <PS1P15301MB03464A08271DC99E0617DF8792550@PS1P15301MB0346.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <87mubyc367.fsf@vitty.brq.redhat.com>


> From: Vitaly Kuznetsov <vkuznets@redhat.com>
> 
> > From: Tianyu Lan <Tianyu.Lan@microsoft.com>
> >
> > @@ -376,6 +391,27 @@ struct dm_hot_add_response {
> >  	__u32 result;
> >  } __packed;
> >
> > +struct dm_hot_remove {
> > +	struct dm_header hdr;
> > +	__u32 virtual_node;
> > +	__u32 page_count;
> > +	__u32 qos_flags;
> > +	__u32 reservedZ;
> > +} __packed;
> > +
> > +struct dm_hot_remove_response {
> > +	struct dm_header hdr;
> > +	__u32 result;
> > +	__u32 range_count;
> > +	__u64 more_pages:1;
> > +	__u64 reservedz:63;
> > +	union dm_mem_page_range range_array[]; } __packed;
> > +
> > +#define DM_REMOVE_QOS_LARGE	 (1 << 0)
> > +#define DM_REMOVE_QOS_LOCAL	 (1 << 1)
> > +#define DM_REMOVE_QoS_MASK       (0x3)
> 
> Capitalize 'QoS' to make it match previous two lines please.
> 

Yes, Will fix it.

> > +
> >  /*
> >   * Types of information sent from host to the guest.
> >   */
> > @@ -457,6 +493,13 @@ struct hot_add_wrk {
> >  	struct work_struct wrk;
> >  };
> >
> > +struct hot_remove_wrk {
> > +	__u32 virtual_node;
> > +	__u32 page_count;
> > +	__u32 qos_flags;
> > +	struct work_struct wrk;
> > +};
> > +
> >  static bool hot_add = true;
> >  static bool do_hot_add;
> >  /*
> > @@ -489,6 +532,7 @@ enum hv_dm_state {
> >  	DM_BALLOON_UP,
> >  	DM_BALLOON_DOWN,
> >  	DM_HOT_ADD,
> > +	DM_HOT_REMOVE,
> >  	DM_INIT_ERROR
> >  };
> >
> > @@ -515,11 +559,13 @@ struct hv_dynmem_device {
> >  	 * State to manage the ballooning (up) operation.
> >  	 */
> >  	struct balloon_state balloon_wrk;
> > +	struct balloon_state unballoon_wrk;
> >
> >  	/*
> >  	 * State to execute the "hot-add" operation.
> 
> This comment is stale now.
> 

Will update. Thanks.

> >  	 */
> >  	struct hot_add_wrk ha_wrk;
> > +	struct hot_remove_wrk hr_wrk;
> 
> Do we actually want to work struct and all the problems with their
> serialization? Can we get away with one?

I think it's possible to just use one work to handle  all kind of msgs
with a work struct which contains parameters for all dm msgs and identify
the msg type in the work callback function. 


 


      reply	other threads:[~2019-12-12 13:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 15:46 [RFC PATCH 0/4] x86/Hyper-V: Add Dynamic memory hot-remove function lantianyu1986
2019-12-10 15:46 ` [RFC PATCH 1/4] mm/resource: Move child to new resource when release mem region lantianyu1986
2019-12-10 15:46 ` [RFC PATCH 2/4] mm/hotplug: Expose is_mem_section_removable() and offline_pages() lantianyu1986
2019-12-11 12:07   ` David Hildenbrand
2019-12-10 15:46 ` [RFC PATCH 3/4] Hyper-V/Balloon: Call add_memory() with dm_device.ha_lock lantianyu1986
2019-12-11 14:57   ` Vitaly Kuznetsov
2019-12-12  8:24     ` [EXTERNAL] " Tianyu Lan
2019-12-10 15:46 ` [RFC PATCH 4/4] x86/Hyper-V: Add memory hot remove function lantianyu1986
2019-12-11 15:06   ` Vitaly Kuznetsov
2019-12-12 13:37     ` Tianyu Lan [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=PS1P15301MB03464A08271DC99E0617DF8792550@PS1P15301MB0346.APCP153.PROD.OUTLOOK.COM \
    --to=tianyu.lan@microsoft.com \
    --cc=eric.devolder@oracle.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=lantianyu1986@gmail.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /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).