From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 7 18:08:32 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DE491065670 for ; Thu, 7 Jan 2010 18:08:32 +0000 (UTC) (envelope-from shrivatsan_v@yahoo.com) Received: from web112004.mail.gq1.yahoo.com (web112004.mail.gq1.yahoo.com [67.195.23.82]) by mx1.freebsd.org (Postfix) with SMTP id 213938FC1A for ; Thu, 7 Jan 2010 18:08:31 +0000 (UTC) Received: (qmail 29849 invoked by uid 60001); 7 Jan 2010 18:08:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1262887709; bh=AQY3CGZ0CPNh2jjNNRjVl86cctzFfGR9ZAGNQ4s6sE8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=QwNfJYDSbMdcOM2uebc8X0mBVKISL0ocT75lJiAV4chLqesFrCZUqjBlyzLBubgNvEZLQbAYvpUp67RI7M+sS59jatsQ5Js+jayAvate6b4aNiNMGtqmwM5UVRH8YSS5IfwjJVTwv0xtr6mPna4ZgPNCWascbnQcsnAtxJ6jt80= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=eeq4GS/5Oq2SU2yIaEEQZJSvy6GXm0o8NNeJAk3cqRDv/MDF0rlICTGVTdoRy51Uh+2s9V/3Uo1bcQWpYn2iqs/5PIxwEFKfT+e6J8m7bi9BtUesJ+ceSmnZ/BKUwOf8rfzsJ9DWoruPEPPbnuNetj3Uye9mP91UH6q4UeUWLlI=; Message-ID: <670994.29087.qm@web112004.mail.gq1.yahoo.com> X-YMail-OSG: IQPT2wcVM1nZRu9IMkQVk.x.HYbqzKxjAZ6LZ3cdXgeMWYemxgw.t8AsQhMM_Khsb1RhEIo9zJqKUSXywwxpK3dpxbo0iJJYy_TCJVSyicApBXP5HK4Hj3auzjIqMjjISQffpFS5.P8tpi4u2sldCNxq9qppWDoDk7iovxQYqf5.3GRvug6yIgbT0grixcI.5sxUepkuNYRq9_C19iZBmlcKC0K4ihYFNBmaXx4Oo85c.HHd0tPbxmMYVKVKhAyAP6jNd9AdEHrfQa2Xq9gFYqF8HLa0hf6RbBeMuZapi7E9mZIppgNiPJL0R4Xx2xSncDnNCRBEdqacK7HNpZhYl4HdzBg- Received: from [66.129.224.36] by web112004.mail.gq1.yahoo.com via HTTP; Thu, 07 Jan 2010 10:08:29 PST X-Mailer: YahooMailClassic/9.0.20 YahooMailWebService/0.8.100.260964 Date: Thu, 7 Jan 2010 10:08:29 -0800 (PST) From: Shrivats To: Pieter de Goeje , Julian Elischer In-Reply-To: <4B452A5D.4000208@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, shrivatsan Subject: Re: Question regarding memory disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 18:08:32 -0000 Thanks a lot for the response.=A0 --- On Wed, 1/6/10, Julian Elischer wrote: From: Julian Elischer Subject: Re: Question regarding memory disks To: "Pieter de Goeje" Cc: freebsd-hackers@freebsd.org, "shrivatsan" Date: Wednesday, January 6, 2010, 7:27 PM Pieter de Goeje wrote: > On Wednesday 06 January 2010 22:49:44 shrivatsan wrote: >> Hi, >>=20 >> I have configured a malloc-backed memory disk, and I mount the device on= to >> the file system. I write some data onto the file system. I see that the >> free memory indicated by kmem_map_free goes down, and this is proportion= al >> to the size of the data written. However, even after removing all the >> data, kmem_map_free doesn't seem to go up. Its only after detaching the >> memory disk does the free memory go up. May I know the reason for this >> behavior? >>=20 >>=20 >> Thanks, >> -shrivatsan >=20 > Because when you "erase" something, all it does is unlink (delete the ref= erence to) the data. So there is currently no way the memory disk can free = the memory associated with the data. That is also why you should normally u= se swap backed memory disks instead, or use tmpfs. These can return memory = to the system. >=20 > The ability of the filesystem to mark certain blocks as "erased" is impor= tant not only for memory disks but also for solid state drives. It is a fea= ture UFS2 is currently lacking unfortunately. but is being worked on >=20 > - Pieter > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" =0A=0A=0A