All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Tamas K Lengyel <tamas.lengyel@zentific.com>
Cc: tim@xen.org, kevin.tian@intel.com, wei.liu2@citrix.com,
	ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
	eddie.dong@intel.com, ian.jackson@eu.citrix.com,
	xen-devel@lists.xen.org, andres@lagarcavilla.org,
	jun.nakajima@intel.com, rshriram@cs.ubc.ca, keir@xen.org,
	dgdegra@tycho.nsa.gov, yanghy@cn.fujitsu.com
Subject: Re: [RFC PATCH V2 3/8] xen/mem_paging: Convert mem_event_op to mem_paging_op
Date: Thu, 22 Jan 2015 15:09:22 +0000	[thread overview]
Message-ID: <54C120B20200007800058414@mail.emea.novell.com> (raw)
In-Reply-To: <1421594281-27658-4-git-send-email-tamas.lengyel@zentific.com>

>>> On 18.01.15 at 16:17, <tamas.lengyel@zentific.com> wrote:
> --- a/xen/arch/x86/mm/mem_paging.c
> +++ b/xen/arch/x86/mm/mem_paging.c
> @@ -25,31 +25,31 @@
>  #include <xen/mem_event.h>
>  
>  
> -int mem_paging_memop(struct domain *d, xen_mem_event_op_t *mec)
> +int mem_paging_memop(struct domain *d, xen_mem_paging_op_t *mpc)
>  {
>      if ( unlikely(!d->mem_event->paging.ring_page) )
>          return -ENODEV;
>  
> -    switch( mec->op )
> +    switch( mpc->op )
>      {
>      case XENMEM_paging_op_nominate:
>      {
> -        unsigned long gfn = mec->gfn;
> +        unsigned long gfn = mpc->gfn;
>          return p2m_mem_paging_nominate(d, gfn);

If you fiddle with this, please fix obvious style issues - here, blank
line after declaration(s). Albeit in the particular cases here I wonder
whether the local variable is really helpful.

> --- a/xen/common/mem_event.c
> +++ b/xen/common/mem_event.c
> @@ -474,7 +474,7 @@ int do_mem_event_op(int op, uint32_t domain, void *arg)
>      {
>  #ifdef HAS_MEM_PAGING
>          case XENMEM_paging_op:
> -            ret = mem_paging_memop(d, (xen_mem_event_op_t *) arg);
> +            ret = mem_paging_memop(d, (xen_mem_paging_op_t *) arg);

Afaict the cast is useless and should be dropped rather than replaced.

> --- a/xen/include/public/memory.h
> +++ b/xen/include/public/memory.h
> @@ -372,7 +372,7 @@ typedef struct xen_pod_target xen_pod_target_t;
>  #define XENMEM_paging_op_evict              1
>  #define XENMEM_paging_op_prep               2
>  
> -struct xen_mem_event_op {
> +struct xen_mem_paging_op {
>      uint8_t     op;         /* XENMEM_*_op_* */

Especially this comment makes me think this was originally intended
for more than just paging. Are we really determined for this to no
longer be the case? If so, the comment should be updated too.

Jan

  parent reply	other threads:[~2015-01-22 15:09 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 15:17 [RFC PATCH V2 0/8] xen: Clean-up of mem_event subsystem Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 1/8] xen/mem_event: Cleanup of mem_event structures Tamas K Lengyel
2015-01-22 12:43   ` Tim Deegan
2015-01-22 12:50     ` Razvan Cojocaru
2015-01-22 12:50     ` Tamas K Lengyel
2015-01-22 12:53       ` Razvan Cojocaru
2015-01-22 13:11       ` Tim Deegan
2015-01-22 15:00   ` Jan Beulich
2015-01-22 15:34     ` Tamas K Lengyel
2015-01-22 16:00       ` Jan Beulich
2015-01-22 16:23         ` Tamas K Lengyel
2015-01-22 16:34           ` Jan Beulich
     [not found]             ` <CAErYnsj8B1Fbo=JD3hLz-8kjtt-FoWTrSkGnbkvVf=iR64MDBQ@mail.gmail.com>
2015-01-23  9:00               ` Jan Beulich
2015-01-23  9:18                 ` Tamas K Lengyel
2015-01-29 11:54       ` Tamas K Lengyel
2015-01-29 12:02         ` Jan Beulich
2015-01-29 12:09           ` Tamas K Lengyel
2015-01-29 12:15             ` Tamas K Lengyel
2015-01-29 12:51             ` Jan Beulich
2015-01-29 13:03               ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 2/8] xen/mem_event: Rename the mem_event ring from 'access' to 'monitor' Tamas K Lengyel
2015-01-22 12:53   ` Tim Deegan
2015-01-22 14:12     ` Tamas K Lengyel
2015-01-22 15:02   ` Jan Beulich
2015-01-22 15:42     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 3/8] xen/mem_paging: Convert mem_event_op to mem_paging_op Tamas K Lengyel
2015-01-22 13:03   ` Tim Deegan
2015-01-22 15:09   ` Jan Beulich [this message]
2015-01-22 15:41     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 4/8] x86/hvm: rename hvm_memory_event_* functions to hvm_event_* Tamas K Lengyel
2015-01-22 13:05   ` Tim Deegan
2015-01-22 15:56   ` Andrew Cooper
2015-01-22 16:34     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 5/8] xen/mem_event: Rename mem_event to vm_event Tamas K Lengyel
2015-01-22 14:52   ` Tim Deegan
2015-01-22 15:02     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 6/8] xen/vm_event: Decouple vm_event and mem_access Tamas K Lengyel
2015-01-22 14:56   ` Tim Deegan
2015-01-22 15:35     ` Tamas K Lengyel
2015-01-18 15:18 ` [RFC PATCH V2 7/8] tools/tests: Clean-up tools/tests/xen-access Tamas K Lengyel
2015-01-18 15:18 ` [RFC PATCH V2 8/8] x86/hvm: factor out vm_event related functions into separate file Tamas K Lengyel
2015-01-22 15:00   ` Tim Deegan
2015-01-22 15:36     ` Tamas K Lengyel
2015-01-22 16:25   ` Jan Beulich
2015-01-22 16:42     ` Tamas K Lengyel
2015-01-22 16:50       ` Tim Deegan
2015-01-23  8:56       ` Razvan Cojocaru
2015-01-23  9:03         ` Jan Beulich
2015-01-23  9:21           ` Tamas K Lengyel
2015-01-22 16:32   ` Andrew Cooper
2015-01-22 16:41     ` Tamas K Lengyel
2015-01-19 13:03 ` [RFC PATCH V2 0/8] xen: Clean-up of mem_event subsystem Andrew Cooper
2015-01-21 10:59   ` Tamas K Lengyel

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=54C120B20200007800058414@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andres@lagarcavilla.org \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tamas.lengyel@zentific.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.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 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.