Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264322AbTKUHe2 (ORCPT ); Fri, 21 Nov 2003 02:34:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264321AbTKUHe1 (ORCPT ); Fri, 21 Nov 2003 02:34:27 -0500 Received: from sv1.valinux.co.jp ([210.128.90.2]:3307 "EHLO sv1.valinux.co.jp") by vger.kernel.org with ESMTP id S264322AbTKUHeN (ORCPT ); Fri, 21 Nov 2003 02:34:13 -0500 Date: Fri, 21 Nov 2003 16:34:11 +0900 From: IWAMOTO Toshihiro To: Andrew Morton Cc: IWAMOTO Toshihiro , linux-kernel@vger.kernel.org Subject: Re: O_DIRECT leaks memory on linux-2.6.0-test9 In-Reply-To: <20031120231749.7cc3f245.akpm@osdl.org> References: <20031121061806.6A65F7007C@sv1.valinux.co.jp> <20031120231749.7cc3f245.akpm@osdl.org> User-Agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: multipart/mixed; boundary="Multipart_Fri_Nov_21_16:34:11_2003-1" Message-Id: <20031121073411.665A27007C@sv1.valinux.co.jp> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4946 Lines: 104 --Multipart_Fri_Nov_21_16:34:11_2003-1 Content-Type: text/plain; charset=US-ASCII At Thu, 20 Nov 2003 23:17:49 -0800, Andrew Morton wrote: > > IWAMOTO Toshihiro wrote: > > > > recently I noticed that direct IO causes memory leaks with > > linux-2.6.0-test9. > > The program that causes memory leaks is "fsstress", which is > > testcases/kernel/fs/fsstress in ltp-full-20031106.tgz (ftp from > > http://sourceforge.net/projects/ltp/). > > > > fsstress does various file operations, and I found that the problem is > > with the combination of write and dread (O_DIRECT read). > > You should be able to reproduce the bug with the following command > > line. > > > > $ while true; do ./fsstress -c -d /usr/src/test -z -f write=1 \ > > -f dread=1 -f creat=1 -S -n 1000 -p 32; done > > It seems OK here. Please take a copy of /proc/meminfo and /proc/slabinfo. It'll take a while to leak a noticable amount of memory. So I reduced the amount of memory using a boot option. I'll try the same test on another machine. Here they are. slabinfo is in the attachment. $ cat /proc/meminfo MemTotal: 254592 kB MemFree: 3952 kB Buffers: 688 kB Cached: 6184 kB SwapCached: 2512 kB Active: 8616 kB Inactive: 212056 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 254592 kB LowFree: 3952 kB SwapTotal: 2097136 kB SwapFree: 2090436 kB Dirty: 0 kB Writeback: 0 kB Mapped: 4924 kB Slab: 15200 kB Committed_AS: 20580 kB PageTables: 344 kB VmallocTotal: 770040 kB VmallocUsed: 9460 kB VmallocChunk: 760580 kB --Multipart_Fri_Nov_21_16:34:11_2003-1 Content-Type: application/octet-stream; type=gzip Content-Disposition: attachment; filename="slabinfo.gz" Content-Transfer-Encoding: base64 H4sIABi+vT8AA72aX5ObNhDA3+9TMNOX9uE6SPx1JpOZdJpJ+5C2M+lD+8RgkO/IYSCAfZd8+kpa CSSBnSJweLi1z1g/Vtpd7a7clem+qA61c++cSdsVdfXKwT+7dz84VXokjnK9TrO+OJOk3n/q3jiv q9NRvmSi+ErgVUNHoWPSN036QLrh7SunP1XpviSd83qf9tljVp+qnt5WFseCye4xbUl+oJS6Zbez r+Vpnw5g9g9Jlq/hS+k5Lco3d22TJfvT4UCR6oPHo8Cuz99h9gepz0T/57P/YbhVwfPL14TLUX3a PWkgieIjOSh0x9caCmH2Cf94BoU0AaiiqnOSZGn2OCyJqwgfhUzsZrQKGB9H8yhXF3enqnhJujp7 mtPK4wwfJnAxypzAPmuS/pkuV/ZE+hGlPdGOEX136QSaWjEUtfFchyH+KNjF8C4cXq9ZK4aqG1Il Lfl8Ip1kaU8UMnAwM4HLtCoq0icNIe1ls9gM1SSHYp88pt3juF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lJ4x5tLHvbXdDmDQBVjcnZVK8vzuQt5oK5VwA8mPPGLHEuU56mCnbGzY1uzFEbCsoWwOxaZtIn/ A7138X7WMwAA --Multipart_Fri_Nov_21_16:34:11_2003-1-- - 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/