tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [RFC] pass FAF flag to perfuse
On Tue, Jun 05, 2012 at 01:01:25PM +0000, Emmanuel Dreyfus wrote:
> Hi
>
> PUFFS sometimes uses Fire-And-Forget (FAF) operation, where the
> request is sent to userland but the result is not awaited. This
> always happens for close, inactive and reclaim, and optionnaly
> happens for fsync, setattr (during fsync), and write (during putpages).
>
> There is a ressource leak when the filesystem is getting unresponsive
> and the kernel keeps sending requests. perfuse and puffs hold buffer
> in userspace related to the requests, and this may last for a while.
>
> Attached patch makes sure a puffs filesystem can be informed that
> a fsync, setattr or write is in FAF mode. libperfuse use it to avoid
> awaiting for the reply of theses operations. Of course, we still
> get FUSE replies, but we ignore them except if there is an error. In
> that later case, we abort.
>
> Opinions?
if this new flag is for userland only, why would you need to
assign an IO_* flag for it in the kernel? it would be better to keep
this out of the kernel's flags if it doesn't need to be there.
-Chuck
> Index: sys/sys/vnode.h
> ===================================================================
> RCS file: /cvsroot/src/sys/sys/vnode.h,v
> retrieving revision 1.236
> diff -U4 -r1.236 vnode.h
> --- sys/sys/vnode.h 24 Nov 2011 15:51:30 -0000 1.236
> +++ sys/sys/vnode.h 5 Jun 2012 12:35:23 -0000
> @@ -289,8 +289,9 @@
> #define IO_NORMAL 0x00800 /* operate on regular data */
> #define IO_EXT 0x01000 /* operate on extended
> attributes */
> #define IO_DIRECT 0x02000 /* direct I/O hint */
> #define IO_JOURNALLOCKED 0x04000 /* journal is already locked */
> +#define IO_FAF 0x08000 /* FAF bit for PUFFS (userland
> only) */
> #define IO_ADV_MASK 0x00003 /* access pattern hint */
>
> #define IO_ADV_SHIFT 0
> #define IO_ADV_ENCODE(adv) (((adv) << IO_ADV_SHIFT) & IO_ADV_MASK)
Home |
Main Index |
Thread Index |
Old Index