From: Jens Axboe <axboe@kernel.dk>
To: David Miller <davem@davemloft.net>, ktkhai@virtuozzo.com
Cc: pankaj.laxminarayan.bharadiya@intel.com, keescook@chromium.org,
viro@zeniv.linux.org.uk, hare@suse.com, tglx@linutronix.de,
edumazet@google.com, arnd@arndb.de, netdev@vger.kernel.org
Subject: Re: [PATCH 0/2] unix: Show number of scm files in fdinfo
Date: Fri, 8 Nov 2019 16:15:05 -0700 [thread overview]
Message-ID: <eb70753a-5bd7-2c94-a381-71e02ba112f6@kernel.dk> (raw)
In-Reply-To: <20191108.113003.601469804110215285.davem@davemloft.net>
On 11/8/19 12:30 PM, David Miller wrote:
> From: Kirill Tkhai <ktkhai@virtuozzo.com>
> Date: Thu, 07 Nov 2019 15:14:15 +0300
>
>> Unix sockets like a block box. You never know what is pending there:
>> there may be a file descriptor holding a mount or a block device,
>> or there may be whole universes with namespaces, sockets with receive
>> queues full of sockets etc.
>>
>> The patchset makes number of pending scm files be visible in fdinfo.
>> This may be useful to determine, that socket should be investigated
>> or which task should be killed to put reference counter on a resourse.
>
> This doesn't even compile:
>
> net/unix/af_unix.c: In function ‘scm_stat_add’:
> ./include/linux/lockdep.h:365:52: error: invalid type argument of ‘->’ (have ‘spinlock_t’ {aka ‘struct spinlock’})
> #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
Quick guess is a missing & on those locks...
But in any case, the feature looks really useful, also for io_uring which
puts all its registered files in the skb. I'll give it a tester here.
--
Jens Axboe
prev parent reply other threads:[~2019-11-08 23:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 12:14 [PATCH 0/2] unix: Show number of scm files in fdinfo Kirill Tkhai
2019-11-07 12:14 ` [PATCH 1/2] net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd] Kirill Tkhai
2019-11-07 12:14 ` [PATCH 2/2] unix: Show number of pending scm files of receive queue in fdinfo Kirill Tkhai
2019-11-08 19:30 ` [PATCH 0/2] unix: Show number of scm files " David Miller
2019-11-08 23:15 ` Jens Axboe [this message]
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=eb70753a-5bd7-2c94-a381-71e02ba112f6@kernel.dk \
--to=axboe@kernel.dk \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hare@suse.com \
--cc=keescook@chromium.org \
--cc=ktkhai@virtuozzo.com \
--cc=netdev@vger.kernel.org \
--cc=pankaj.laxminarayan.bharadiya@intel.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).