From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965446AbbI2OdF (ORCPT ); Tue, 29 Sep 2015 10:33:05 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:33872 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965065AbbI2Oc6 (ORCPT ); Tue, 29 Sep 2015 10:32:58 -0400 Subject: Re: [PATCH] Patch to integrate RapidDisk and RapidCache RAM Drive / Caching modules into the kernel To: Petros Koutoupis , Christoph Hellwig References: <1443374244.8013.7.camel@petros-ultrathin> <20150928064936.GA22280@infradead.org> <20150928162944.GA29562@infradead.org> <56096E90.2020000@petroskoutoupis.com> Cc: linux-kernel@vger.kernel.org, "devel@rapiddisk.org" From: Austin S Hemmelgarn Message-ID: <560AA116.9030300@gmail.com> Date: Tue, 29 Sep 2015 10:32:54 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56096E90.2020000@petroskoutoupis.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms080308050706050607080309" X-Antivirus: avast! (VPS 150929-0, 2015-09-29), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a cryptographically signed message in MIME format. --------------ms080308050706050607080309 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-09-28 12:45, Petros Koutoupis wrote: > Christoph, > > See my replies below.... > > On 9/28/15 11:29 AM, Christoph Hellwig wrote: >> Hi Petros, >> >> On Mon, Sep 28, 2015 at 09:12:13AM -0500, Petros Koutoupis wrote: >>> 1. Unlike the already mainline ramdisk driver, RapidDisk is designed= >>> to be >>> managed dynamically. That is, instead of configuring a fixed number o= f >>> volumes and volume sizes as compile/boot time variables, RapidDisk wi= ll >>> allow you to add, remove, and resize your RAM drive(s) at runtime. >>> Besides, >>> the built in module is designed to work with smaller sizes in mind wh= ile >>> RapidDisk focuses on larger sizes that can reach to the multiple >>> Gigabytes >>> or even Terabytes. Much like the built in module, it will allocate >>> pages as >>> they are needed which allows for over provisioning (not that it is >>> advised) >>> of volume sizes. >> The ramdisk driver allows to selects sizes and count at module load >> load. I agree that having runtime control would be even better, but >> that's best done by adding a runtime interface to the existing driver >> instead of duplicating it. > I understand the concern and I will definitely scope out this approach,= > although at the moment, I am not sure how both approaches will play nic= e > together. As mentioned above, the current implementation requires the > predefined number of ram drives with the specified size to be configure= d > at boot time (or compiled into the kernel). The only wiggle room I see > for runtime control is resizing individual volumes. Just because there is not code currently to do dynamic=20 allocation/freeing of ramdisks in the current driver doesn't mean that=20 it isn't possible, it just means that nobody has written code to do it=20 yet. This functionality would be extremely useful (I often use ramdisks = on a VM host as a small amount of very fast swap space for the virtual=20 machines). On top of that, the deduplication would be a wonderful=20 feature, although it may already be indirectly implemented through KSM=20 (that is, when KSM is on and configured to scan everything, I'm not sure = if it scans memory used by the ramdisks or not). >>> 2. The majority of RapidDisk code focuses on the use of Volatile memo= ry. >>> The support for Non-Volatile memory is a bit newer and there may be s= ome >>> overlap here with the recently integrated pmem code. The only >>> advantage to >>> having this code within RapidDisk is to provide the user with the >>> ability >>> to manage both technologies simultaneously, through a single interfac= e. >> Which really doesn't sound like a good enough reason to duplicate it. > I do not disagree with your comment here. This component does not have > to be patched into the mainline. > >>> 3. The RapidCache component is designed around the Non-Volatile >>> functionality of RapidDisk (hence the block-level Write-Through >>> caching). >>> It is also coded and optimized around the RapidDisk sizes/variables, >>> out-of-box. It is worth noting that I am in the process of expanding >>> this >>> module to add deduplication support. This will leverage RapidDisk's >>> ability >>> to allocate pages only when needed and reduce the cache's memory >>> footprint; >>> making more out of less. >> Still needs some code comparism to our existing two caching solutions.= >> >> I'd love to see you go ahead with the dynamic ramdisk configuration as= >> this is clearly a very useful feature. A caching solution that is >> optimized for non-volatile memory does sound useful, but we'll still >> need a patch better explaining how it actually is as useful as it migh= t >> sound. > CORRECTION: I meant to say Volatile and NOT Non-Volatile. RapidCache is= > designed around Volatile memory. I guess I was a little to excited in m= y > response and I do apologize for that. I will provide a code comparison > in my next e-mail, after I go through the existing RAM drive code. To a certain extent, I see that as potentially less useful than=20 optimized for non-volatile memory. While the current incarnation of the = pagecache in Linux could stand to have some serious performance=20 improvements (just think how fast things would be if we used ARC instead = of plain LRU), it does still do it's job well for most workloads=20 (although being able to tell the kernel to reserve some portion of=20 memory _just_ for the pagecache would be an interesting and probably=20 very useful feature). --------------ms080308050706050607080309 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Brgwgga0MIIEnKADAgECAgMRLfgwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcwHhcN MTUwOTIxMTEzNTEzWhcNMTYwMzE5MTEzNTEzWjBjMRgwFgYDVQQDEw9DQWNlcnQgV29UIFVz ZXIxIzAhBgkqhkiG9w0BCQEWFGFoZmVycm9pbjdAZ21haWwuY29tMSIwIAYJKoZIhvcNAQkB FhNhaGVtbWVsZ0BvaGlvZ3QuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA nQ/81tq0QBQi5w316VsVNfjg6kVVIMx760TuwA1MUaNQgQ3NyUl+UyFtjhpkNwwChjgAqfGd LIMTHAdObcwGfzO5uI2o1a8MHVQna8FRsU3QGouysIOGQlX8jFY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