[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Findutils-patches] [PATCH] find memory leak
From: |
Bernhard Voelker |
Subject: |
Re: [Findutils-patches] [PATCH] find memory leak |
Date: |
Tue, 7 Feb 2017 23:25:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 02/07/2017 08:26 PM, Goffredo Baroncelli wrote:
> I found the problem. I using btrfs as my filesystem, which has an
> inconsistency between /proc/self/mountinfo and stat.
aha, and I had almost already wanted you to ask if you are using weird file
system types ... ;-)
> $ cat /proc/self/mountinfo | grep btrfs
> 20 0 0:18 /debian / rw,noatime,nodiratime shared:1 - btrfs /dev/sdc3
> rw,ssd,space_cache,subvolid=257,subvol=/debian
> 73 20 0:18 /boot /boot rw,noatime,nodiratime shared:29 - btrfs /dev/sdc3
> rw,ssd,space_cache,subvolid=299,subvol=/boot
> 75 20 0:18 / /var/btrfs rw,noatime,nodiratime shared:30 - btrfs /dev/sdc3
> rw,ssd,space_cache,subvolid=5,subvol=/
> $ stat /
> File: /
> Size: 280 Blocks: 0 IO Block: 4096 directory
> Device: 14h/20d Inode: 256 Links: 1
> Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
> Access: 2015-09-06 12:06:36.151128298 +0200
> Modify: 2017-01-15 22:44:46.869717588 +0100
> Change: 2017-01-15 22:44:46.869717588 +0100
> Birth: -
>
> /proc/self/mountinfo for "/" has 0:18, but stat shows 0:20
>
> $ stat /boot/
> File: /boot/
> Size: 1202 Blocks: 0 IO Block: 4096 directory
> Device: 2bh/43d Inode: 256 Links: 1
> Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
> Access: 2015-08-29 13:21:52.035986005 +0200
> Modify: 2017-02-05 00:18:07.351236324 +0100
> Change: 2017-02-05 00:18:07.351236324 +0100
> Birth: -
>
> /proc/self/mountinfo for "/boot" has 0:18, but stat shows 0:43
>
>
> (See for further detail
>
> https://www.spinics.net/lists/linux-btrfs/msg58908.html)
>
> So apart the leak, "find" under btrfs has bad performance due to the
> inconsistency between /proc/self/mountinfo and stat()..
Okay, so for btrfs, the cache function obviously doesn't work based on st_dev.
I have to think about how to work around that - it's a pity we have to
single out special file system types ...
Have a nice day,
Berny
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/01
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/02
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/02
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/03
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/05
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/06
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/06
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/07
- Re: [Findutils-patches] [PATCH] find memory leak,
Bernhard Voelker <=
- Re: [Findutils-patches] [PATCH] find memory leak, Dale R. Worley, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Dale R. Worley, 2017/02/09
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/09
- Re: [Findutils-patches] [PATCH] find memory leak, Dale R. Worley, 2017/02/10
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/12
- Re: [Findutils-patches] [PATCH] find memory leak, Dale R. Worley, 2017/02/12