All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Peng Tao <tao.peng@linux.alibaba.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH-v2] virtiofs: FUSE_REMOVEMAPPING remove multiple entries in one call
Date: Mon, 3 Jun 2019 15:24:22 -0400	[thread overview]
Message-ID: <20190603192422.GC18585@redhat.com> (raw)
In-Reply-To: <20190603024651.47305-1-tao.peng@linux.alibaba.com>


[..]
> diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
> index 5042e227e8a8..b588a028f099 100644
> --- a/include/uapi/linux/fuse.h
> +++ b/include/uapi/linux/fuse.h
> @@ -850,10 +850,17 @@ struct fuse_setupmapping_out {
>  struct fuse_removemapping_in {
>          /* An already open handle */
>          uint64_t	fh;

So this range reclaim is per inode. I am wondering if there is any
merit in making this message even more generic. That is, message
will allow you to send ranges from different files/fh. That is
make fh parameter part of fuse_removemapping_one instead.

In theory this can be helpful when we are trying to free memory. Instead
of freeing one range, we could free multiple ranges in one go. That too
these could belong to different files. 

What I am not sure is whether we can come up with deadlock free way 
of locking all the inodes or not.

One option can be that move fh parameter in fuse_removemapping_one and
keep that flexibility of specifying ranges belonging to different files.

Even if we don't end up using it, it might not hurt much.

Thanks
Vivek

> +	/* number of fuse_removemapping_one follows */
> +	uint32_t	count;
> +};
> +
> +struct fuse_removemapping_one {
>  	/* Offset into the dax window start the unmapping */
>  	uint64_t        moffset;
>          /* Length of mapping required */
>          uint64_t	len;
>  };

> +#define FUSE_REMOVEMAPPING_MAX_ENTRY	\
> +		(PAGE_SIZE / sizeof(struct fuse_removemapping_one))
>  
>  #endif /* _LINUX_FUSE_H */
> -- 
> 2.17.1
> 


  reply	other threads:[~2019-06-03 19:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03  2:46 [Virtio-fs] [PATCH-v2] virtiofs: FUSE_REMOVEMAPPING remove multiple entries in one call Peng Tao
2019-06-03 19:24 ` Vivek Goyal [this message]
2019-06-03 19:55   ` Vivek Goyal
2019-06-03 21:20 ` Vivek Goyal
2019-06-04  6:25   ` Peng Tao
2019-06-04 21:28 ` Vivek Goyal
2019-06-05  2:34   ` Peng Tao

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=20190603192422.GC18585@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=tao.peng@linux.alibaba.com \
    --cc=virtio-fs@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 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.