* [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume
@ 2012-02-26 14:05 Olaf Hering
2012-02-27 19:54 ` Tim Deegan
0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2012-02-26 14:05 UTC (permalink / raw)
To: xen-devel
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1330265060 -3600
# Node ID 3ace34b89ebe3bdd6afb0bca85b0c1270f99c1bb
# Parent 6fb2fee7c1833529cee81ca79994b0b132febdea
xenpaging: remove obsolete XENMEM_paging_op_resume
With changeset 24364:0964341efd65 an event channel based notification of
new responses in the ringbuffer is implemented. This makes the memevent
interface obsolete. Currently a call to p2m_mem_paging_resume() is
triggered twice by xenpaging, once per memevent and once per even
channel. In practice this double call does not lead to issues because
p2m_mem_paging_resume() processes only available events.
xenpaging used the event channel notification since the beginning, but
it was a no-op until changeset mentioned above. This change removes the
unneeded XENMEM_paging_op_resume functionality. Pagers are notified via
an event channel of new requests, and now they are required to notify
the hypervisor about their responses also with an event channel.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
diff -r 6fb2fee7c183 -r 3ace34b89ebe tools/libxc/xc_mem_paging.c
--- a/tools/libxc/xc_mem_paging.c
+++ b/tools/libxc/xc_mem_paging.c
@@ -93,14 +93,6 @@ int xc_mem_paging_load(xc_interface *xch
return rc;
}
-int xc_mem_paging_resume(xc_interface *xch, domid_t domain_id, unsigned long gfn)
-{
- return xc_mem_event_memop(xch, domain_id,
- XENMEM_paging_op_resume,
- XENMEM_paging_op,
- gfn, NULL);
-}
-
/*
* Local variables:
diff -r 6fb2fee7c183 -r 3ace34b89ebe tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1902,8 +1902,6 @@ int xc_mem_paging_evict(xc_interface *xc
int xc_mem_paging_prep(xc_interface *xch, domid_t domain_id, unsigned long gfn);
int xc_mem_paging_load(xc_interface *xch, domid_t domain_id,
unsigned long gfn, void *buffer);
-int xc_mem_paging_resume(xc_interface *xch, domid_t domain_id,
- unsigned long gfn);
int xc_mem_access_enable(xc_interface *xch, domid_t domain_id,
void *shared_page, void *ring_page);
diff -r 6fb2fee7c183 -r 3ace34b89ebe tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -658,8 +658,6 @@ static int xenpaging_evict_page(struct x
static int xenpaging_resume_page(struct xenpaging *paging, mem_event_response_t *rsp, int notify_policy)
{
- int ret;
-
/* Put the page info on the ring */
put_response(&paging->mem_event, rsp);
@@ -680,14 +678,7 @@ static int xenpaging_resume_page(struct
}
/* Tell Xen page is ready */
- ret = xc_mem_paging_resume(paging->xc_handle, paging->mem_event.domain_id,
- rsp->gfn);
- if ( ret == 0 )
- ret = xc_evtchn_notify(paging->mem_event.xce_handle,
- paging->mem_event.port);
-
- out:
- return ret;
+ return xc_evtchn_notify(paging->mem_event.xce_handle, paging->mem_event.port);
}
static int xenpaging_populate_page(struct xenpaging *paging, unsigned long gfn, int i)
diff -r 6fb2fee7c183 -r 3ace34b89ebe xen/arch/x86/mm/mem_paging.c
--- a/xen/arch/x86/mm/mem_paging.c
+++ b/xen/arch/x86/mm/mem_paging.c
@@ -53,13 +53,6 @@ int mem_paging_memop(struct domain *d, x
}
break;
- case XENMEM_paging_op_resume:
- {
- p2m_mem_paging_resume(d);
- return 0;
- }
- break;
-
default:
return -ENOSYS;
break;
diff -r 6fb2fee7c183 -r 3ace34b89ebe xen/include/public/memory.h
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -322,7 +322,6 @@ typedef struct xen_pod_target xen_pod_ta
#define XENMEM_paging_op_nominate 0
#define XENMEM_paging_op_evict 1
#define XENMEM_paging_op_prep 2
-#define XENMEM_paging_op_resume 3
#define XENMEM_access_op 21
#define XENMEM_access_op_resume 0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume
2012-02-26 14:05 [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume Olaf Hering
@ 2012-02-27 19:54 ` Tim Deegan
2012-02-27 20:11 ` Olaf Hering
0 siblings, 1 reply; 5+ messages in thread
From: Tim Deegan @ 2012-02-27 19:54 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel
At 15:05 +0100 on 26 Feb (1330268705), Olaf Hering wrote:
> diff -r 6fb2fee7c183 -r 3ace34b89ebe xen/include/public/memory.h
> --- a/xen/include/public/memory.h
> +++ b/xen/include/public/memory.h
> @@ -322,7 +322,6 @@ typedef struct xen_pod_target xen_pod_ta
> #define XENMEM_paging_op_nominate 0
> #define XENMEM_paging_op_evict 1
> #define XENMEM_paging_op_prep 2
> -#define XENMEM_paging_op_resume 3
Acked, except for this part - we should leave a gravestone here so
we don't reuse the number. Anyone using the old interface should get an
explicit ENOSYS error.
Tim.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume
2012-02-27 19:54 ` Tim Deegan
@ 2012-02-27 20:11 ` Olaf Hering
2012-02-27 20:53 ` Tim Deegan
0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2012-02-27 20:11 UTC (permalink / raw)
To: Tim Deegan; +Cc: xen-devel
On Mon, Feb 27, Tim Deegan wrote:
> At 15:05 +0100 on 26 Feb (1330268705), Olaf Hering wrote:
> > diff -r 6fb2fee7c183 -r 3ace34b89ebe xen/include/public/memory.h
> > --- a/xen/include/public/memory.h
> > +++ b/xen/include/public/memory.h
> > @@ -322,7 +322,6 @@ typedef struct xen_pod_target xen_pod_ta
> > #define XENMEM_paging_op_nominate 0
> > #define XENMEM_paging_op_evict 1
> > #define XENMEM_paging_op_prep 2
> > -#define XENMEM_paging_op_resume 3
>
> Acked, except for this part - we should leave a gravestone here so
> we don't reuse the number. Anyone using the old interface should get an
> explicit ENOSYS error.
There can be no old user. xen-4.1 did not have this interface and
XENMEM_paging_* is just a 17 days old.
Olaf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume
2012-02-27 20:11 ` Olaf Hering
@ 2012-02-27 20:53 ` Tim Deegan
2012-03-01 15:58 ` Ian Jackson
0 siblings, 1 reply; 5+ messages in thread
From: Tim Deegan @ 2012-02-27 20:53 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel
At 21:11 +0100 on 27 Feb (1330377060), Olaf Hering wrote:
> On Mon, Feb 27, Tim Deegan wrote:
>
> > At 15:05 +0100 on 26 Feb (1330268705), Olaf Hering wrote:
> > > diff -r 6fb2fee7c183 -r 3ace34b89ebe xen/include/public/memory.h
> > > --- a/xen/include/public/memory.h
> > > +++ b/xen/include/public/memory.h
> > > @@ -322,7 +322,6 @@ typedef struct xen_pod_target xen_pod_ta
> > > #define XENMEM_paging_op_nominate 0
> > > #define XENMEM_paging_op_evict 1
> > > #define XENMEM_paging_op_prep 2
> > > -#define XENMEM_paging_op_resume 3
> >
> > Acked, except for this part - we should leave a gravestone here so
> > we don't reuse the number. Anyone using the old interface should get an
> > explicit ENOSYS error.
>
> There can be no old user. xen-4.1 did not have this interface and
> XENMEM_paging_* is just a 17 days old.
Fair enough. :) Ack.
Tim.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume
2012-02-27 20:53 ` Tim Deegan
@ 2012-03-01 15:58 ` Ian Jackson
0 siblings, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2012-03-01 15:58 UTC (permalink / raw)
To: Tim Deegan; +Cc: Olaf Hering, xen-devel
Tim Deegan writes ("Re: [Xen-devel] [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume"):
> At 21:11 +0100 on 27 Feb (1330377060), Olaf Hering wrote:
> > > At 15:05 +0100 on 26 Feb (1330268705), Olaf Hering wrote:
> > > > diff -r 6fb2fee7c183 -r 3ace34b89ebe xen/include/public/memory.h
> > > > --- a/xen/include/public/memory.h
> > > > +++ b/xen/include/public/memory.h
> Fair enough. :) Ack.
Thanks. The tools parts are fine too so,
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-01 15:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-26 14:05 [PATCH] xenpaging: remove obsolete XENMEM_paging_op_resume Olaf Hering
2012-02-27 19:54 ` Tim Deegan
2012-02-27 20:11 ` Olaf Hering
2012-02-27 20:53 ` Tim Deegan
2012-03-01 15:58 ` Ian Jackson
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.