Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756540AbbDPImN (ORCPT ); Thu, 16 Apr 2015 04:42:13 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:20626 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751647AbbDPImK (ORCPT ); Thu, 16 Apr 2015 04:42:10 -0400 X-AuditID: cbfec7f5-b7f1e6d00000617c-f5-552f75d79a3a Message-id: <552F75D6.4030902@samsung.com> Date: Thu, 16 Apr 2015 10:41:58 +0200 From: Beata Michalska User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-version: 1.0 To: Eric Sandeen Cc: linux-kernel@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, hughd@google.com, lczerner@redhat.com, hch@infradead.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, kyungmin.park@samsung.com, kmpark@infradead.org Subject: Re: [RFC 1/4] fs: Add generic file system event notifications References: <1429082147-4151-1-git-send-email-b.michalska@samsung.com> <1429082147-4151-2-git-send-email-b.michalska@samsung.com> <552F308F.1050505@redhat.com> In-reply-to: <552F308F.1050505@redhat.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsVy+t/xa7rXS/VDDZbPlrL4+qWDxeL0hEVM Fk8/9bFY3Lq8isXibNMbdotlDzazWMycd4fN4vKuOWwW99b8Z7WYvsXRorXnJ7sDt0fL5nKP BZtKPTav0PLY9GkSu0fTmaPMHu/3XWXz6NuyitHj8ya5AI4oLpuU1JzMstQifbsEroxzD24w Fkzgq5j+5iZTA+MW7i5GTg4JAROJxx9fs0HYYhIX7q0Hsrk4hASWMkr8vTqNFcL5yChx4P10 ZpAqXgEtiWe3t7J3MXJwsAioSpy8zAcSZhPQl3g1YyUTiC0qECHx5/Q+VohyQYkfk++xgNgi QOXv3l9lBpnJLPCKUWLlpedgRcICbhLNG66yQCxbzCixpes8O0iCE2jZvcYrTCDLmAX0JO5f 1AIJMwvIS2xe85Z5AqPALCQ7ZiFUzUJStYCReRWjaGppckFxUnqukV5xYm5xaV66XnJ+7iZG SIx83cG49JjVIUYBDkYlHt4bMnqhQqyJZcWVuYcYJTiYlUR4j6frhwrxpiRWVqUW5ccXleak Fh9iZOLglGpgZDnhKfi+WLz9966duRY3siIy8xridx37sp4vwdu/JPrzmS2686vLdR+47Sh5 9ubAjVXrXd8LZt2+vGNNq0/z1Aqjw717cqbwNEqGVQn8aj38W8f8ifchdrs5ZcLHK1ru5f4/ vHn/Rq/VnyeKzLiy80lLW7KZ5mHft5t2OImvaojJ5S8IyX0rr8RSnJFoqMVcVJwIAMBk+zJv AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2002 Lines: 56 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 >> + 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. BR Beata -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/