All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [SPAM] [PATCH] 9pfs: disable msize warning for synth driver
Date: Mon, 7 Sep 2020 11:57:58 +0200	[thread overview]
Message-ID: <20200907115758.70366924@bahia.lan> (raw)
In-Reply-To: <E1kEyDy-0006nN-5A@lizzy.crudebyte.com>

On Sun, 6 Sep 2020 18:50:32 +0200
Christian Schoenebeck <qemu_oss@crudebyte.com> wrote:

> Previous patch introduced a performance warning being logged on host
> side if client connected with an 'msize' <= 8192. Disable this
> performance warning for the synth driver to prevent that warning from
> being printed whenever the 9pfs (qtest) test cases are running.
> 
> Introduce a new export flag V9FS_NO_PERF_WARN for that purpose, which
> might also be used to disable such warnings from the CLI in future.
> 
> We could have also prevented the warning by simply raising P9_MAX_SIZE
> in virtio-9p-test.c to any value larger than 8192, however in the
> context of test cases it makes sense running for edge cases, which
> includes the lowest 'msize' value supported by the server which is
> 4096, hence we want to preserve an msize of 4096 for the test client.
> 
> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---

Heh, yes I guess it makes sense :)

I guess you could maybe queue this patch before the other one.

Reviewed-by: Greg Kurz <groug@kaod.org>

>  fsdev/file-op-9p.h | 4 ++++
>  hw/9pfs/9p-synth.c | 2 ++
>  hw/9pfs/9p.c       | 2 +-
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
> index f2f7772c86..d51cec2f3b 100644
> --- a/fsdev/file-op-9p.h
> +++ b/fsdev/file-op-9p.h
> @@ -64,6 +64,10 @@ typedef struct ExtendedOps {
>   */
>  #define V9FS_REMAP_INODES           0x00000200
>  #define V9FS_FORBID_MULTIDEVS       0x00000400
> +/*
> + * Disables certain performance warnings from being logged on host side.
> + */
> +#define V9FS_NO_PERF_WARN           0x00000800
>  
>  #define V9FS_SEC_MASK               0x0000003C
>  
> diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
> index 7eb210ffa8..cec8c0eefc 100644
> --- a/hw/9pfs/9p-synth.c
> +++ b/hw/9pfs/9p-synth.c
> @@ -541,6 +541,8 @@ static int synth_init(FsContext *ctx, Error **errp)
>      QLIST_INIT(&synth_root.child);
>      qemu_mutex_init(&synth_mutex);
>  
> +    ctx->export_flags |= V9FS_NO_PERF_WARN;
> +
>      /* Add "." and ".." entries for root */
>      v9fs_add_dir_node(&synth_root, synth_root.attr->mode,
>                        "..", synth_root.attr, synth_root.attr->inode);
> diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
> index 99b6f24fd6..741d222c3f 100644
> --- a/hw/9pfs/9p.c
> +++ b/hw/9pfs/9p.c
> @@ -1354,7 +1354,7 @@ static void coroutine_fn v9fs_version(void *opaque)
>      }
>  
>      /* 8192 is the default msize of Linux clients */
> -    if (s->msize <= 8192) {
> +    if (s->msize <= 8192 && !(s->ctx.export_flags & V9FS_NO_PERF_WARN)) {
>          warn_report_once(
>              "9p: degraded performance: a reasonable high msize should be "
>              "chosen on client/guest side (chosen msize is <= 8192). See "



  reply	other threads:[~2020-09-07  9:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 16:50 [PATCH] 9pfs: disable msize warning for synth driver Christian Schoenebeck
2020-09-07  9:57 ` Greg Kurz [this message]
2020-09-07 11:55   ` Christian Schoenebeck
2020-09-07 12:27     ` Greg Kurz
2020-09-08  8:10       ` Greg Kurz
2020-09-08  9:01         ` Christian Schoenebeck
2020-09-08  9:34           ` Greg Kurz
2020-09-08 10:03             ` Christian Schoenebeck
2020-09-08 11:02               ` Christian Schoenebeck
2020-09-08  9:54           ` Christian Schoenebeck

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=20200907115758.70366924@bahia.lan \
    --to=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.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.