[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.11.1504161229450.17935@eggly.anvils>
Date: Thu, 16 Apr 2015 13:10:23 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Beata Michalska <b.michalska@...sung.com>
cc: Eric Sandeen <sandeen@...hat.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
linux-kernel@...r.kernel.org, tytso@....edu,
adilger.kernel@...ger.ca, hughd@...gle.com, lczerner@...hat.com,
hch@...radead.org, linux-ext4@...r.kernel.org, linux-mm@...ck.org,
kyungmin.park@...sung.com, kmpark@...radead.org
Subject: Re: [RFC 1/4] fs: Add generic file system event notifications
On Thu, 16 Apr 2015, Beata Michalska wrote:
> On 04/16/2015 05:46 AM, Eric Sandeen wrote:
> > On 4/15/15 2:15 AM, Beata Michalska wrote:
> >> Introduce configurable generic interface for file
> >> system-wide event notifications to provide file
> >> systems with a common way of reporting any potential
> >> issues as they emerge.
> >>
> >> The notifications are to be issued through generic
> >> netlink interface, by a dedicated, for file system
> >> events, multicast group. The file systems might as
> >> well use this group to send their own custom messages.
> >
> > ...
> >
> >> + 4.3 Threshold notifications:
> >> +
> >> + #include <linux/fs_event.h>
> >> + void fs_event_alloc_space(struct super_block *sb, u64 ncount);
> >> + void fs_event_free_space(struct super_block *sb, u64 ncount);
> >> +
> >> + Each filesystme supporting the treshold notifiactions should call
> >> + fs_event_alloc_space/fs_event_free_space repsectively whenever the
> >> + ammount of availbale blocks changes.
> >> + - sb: the filesystem's super block
> >> + - ncount: number of blocks being acquired/released
> >
> > so:
> >
> >> +void fs_event_alloc_space(struct super_block *sb, u64 ncount)
> >> +{
> >> + struct fs_trace_entry *en;
> >> + s64 count;
> >> +
> >> + spin_lock(&fs_trace_lock);
> >
> > Every allocation/free for every supported filesystem system-wide will be
> > serialized on this global spinlock? That sounds like a non-starter...
> >
> > -Eric
> >
> I guess there is a plenty room for improvements as this is an early version.
> I do agree that this might be a performance bottleneck event though I've tried
> to keep this to minimum - it's being taken only for hashtable look-up. But still...
> I was considering placing the trace object within the super_block to skip
> this look-up part but I'd like to gather more comments, especially on the concept
> itself.
Sorry, I have no opinion on the netlink fs notifications concept
itself, not my area of expertise at all.
No doubt you Cc'ed me for tmpfs: I am very glad you're now trying the
generic filesystem route, and yes, I'd be happy to have the support
in tmpfs, thank you - if it is generally agreed to be suitable for
filesystems; but wouldn't want this as a special for tmpfs.
However, I must echo Eric's point: please take a look at 7e496299d4d2
"tmpfs: make tmpfs scalable with percpu_counter for used blocks":
Tim would be unhappy if you added overhead back into that path.
(And please Cc linux-fsdevel@...r.kernel.org next time you post these.)
Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists