linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Theodore Ts'o <tytso@mit.edu>
Subject: Re: [patch][rfc] rewrite ramdisk
Date: Tue, 16 Oct 2007 18:07:40 +1000	[thread overview]
Message-ID: <200710161807.41157.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0710160945110.10197@fbirervta.pbzchgretzou.qr>

On Tuesday 16 October 2007 17:52, Jan Engelhardt wrote:
> On Oct 16 2007 17:47, Nick Piggin wrote:
> >Here's a quick first hack...
>
> Inline patches preferred ;-)

Thanks for reviewing it anyway ;)


> >+config BLK_DEV_BRD
> >+	tristate "RAM block device support"
> >+	---help---
> >+	  This is a new  based block driver that replaces BLK_DEV_RAM.
>
> based on what?         -^

RAM based.


> >+	  To compile this driver as a module, choose M here: the
> >+	  module will be called rd.
>
> called brd.ko.

Changed. But it will hopefully just completely replace rd.c,
so I will probably just rename it to rd.c at some point (and
change .config options to stay compatible). Unless someone
sees a problem with that?


> >+/*
> >+ * And now the modules code and kernel interface.
> >+ */
> >+static int rd_nr;
> >+static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
>
> Perhaps unsigned?
> Perhaps even long for rd_size?

I've taken most of that stuff out of rd.c in an effort to stay
back compatible. I don't know if it really matters to use long?


> >+module_param(rd_nr, int, 0);
> >+MODULE_PARM_DESC(rd_nr, "Maximum number of brd devices");
> >+module_param(rd_size, int, 0);
> >+MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes.");
> >+MODULE_LICENSE("GPL");
> >+MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
> >+
> >+/* options - nonmodular */
> >+#ifndef MODULE
> >+static int __init ramdisk_size(char *str)
> >+{
> >+	rd_size = simple_strtol(str,NULL,0);
> >+	return 1;
> >+}
>
> Is this, besides for compatibility, really needed?
>
> >+static int __init ramdisk_size2(char *str)
> >+{
> >+	return ramdisk_size(str);
> >+}
> >+static int __init rd_nr(char *str)
>
> Err! Overlapping symbols! The rd_nr() function collides with the rd_nr
> variable.

Thanks... %s gone awry. Fixed to the expected names.


> It also does not seem needed, since it did not exist before. 
> It should go, you can set the variable with brd.rd_nr=XXX (same
> goes for ramdisk_size).

But only if it's a module?


> What's the point of ramdisk_size2()? 

Back compat. When rewriting the internals, I want to try avoid
changing any externals if possible. Whether this is the Right
Way to do it or not, I don't know :P


> >+{
> >+	rd_nr = simple_strtol(str, NULL, 0);
> >+	return 1;
> >+}
> >+__setup("ramdisk=", ramdisk_size);
> >+__setup("ramdisk_size=", ramdisk_size2);
>
> __setup("ramdisk_size=", ramdisk_size); maybe, or does not that work?

Didn't try it, but the rd.c code does the same thing so I guess it
doesn't (or didn't, when it was written).

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-10-16  8:07 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15  8:28 [PATCH resend] ramdisk: fix zeroed ramdisk pages on memory pressure Christian Borntraeger
2007-10-15 14:06 ` Nick Piggin
2007-10-15  9:05   ` Christian Borntraeger
2007-10-15 14:38     ` Nick Piggin
2007-10-15 18:38       ` Eric W. Biederman
2007-10-15 22:37         ` Eric W. Biederman
2007-10-15 22:40           ` [PATCH] rd: Preserve the dirty bit in init_page_buffers() Eric W. Biederman
2007-10-15 22:42             ` [PATCH] rd: Mark ramdisk buffers heads dirty Eric W. Biederman
2007-10-16  7:56               ` Christian Borntraeger
2007-10-16  9:22                 ` Eric W. Biederman
2007-10-17 16:14                 ` Christian Borntraeger
2007-10-17 17:57                   ` Eric W. Biederman
2007-10-17 19:14                     ` Chris Mason
2007-10-17 20:29                       ` Eric W. Biederman
2007-10-17 20:54                         ` Chris Mason
2007-10-17 21:30                           ` Eric W. Biederman
2007-10-17 22:58                             ` Chris Mason
2007-10-17 23:28                               ` Eric W. Biederman
2007-10-18  0:03                                 ` Chris Mason
2007-10-18  3:27                                   ` Eric W. Biederman
2007-10-18  3:59                                   ` [RFC][PATCH] block: Isolate the buffer cache in it's own mappings Eric W. Biederman
2007-10-18  4:32                                     ` Andrew Morton
2007-10-19 21:27                                       ` Eric W. Biederman
2007-10-21  4:24                                         ` Nick Piggin
2007-10-21  4:53                                           ` Eric W. Biederman
2007-10-21  5:36                                             ` Nick Piggin
2007-10-21  7:09                                               ` Eric W. Biederman
2007-10-22  0:15                                           ` David Chinner
2007-10-18  5:10                                     ` Nick Piggin
2007-10-19 21:35                                       ` Eric W. Biederman
2007-10-17 21:48                     ` [PATCH] rd: Mark ramdisk buffers heads dirty Christian Borntraeger
2007-10-17 22:22                       ` Eric W. Biederman
2007-10-18  9:26                         ` Christian Borntraeger
2007-10-19 22:46                           ` Eric W. Biederman
2007-10-19 22:51                           ` [PATCH] rd: Use a private inode for backing storage Eric W. Biederman
2007-10-21  4:28                             ` Nick Piggin
2007-10-21  5:10                               ` Eric W. Biederman
2007-10-21  5:24                                 ` Nick Piggin
2007-10-21  6:48                                   ` Eric W. Biederman
2007-10-21  7:28                                     ` Christian Borntraeger
2007-10-21  8:23                                       ` Eric W. Biederman
2007-10-21  9:56                                         ` Nick Piggin
2007-10-21 18:39                                           ` Eric W. Biederman
2007-10-22  1:56                                             ` Nick Piggin
2007-10-22 13:11                                             ` Chris Mason
2007-10-21  9:39                                     ` Nick Piggin
2007-10-21 17:56                                       ` Eric W. Biederman
2007-10-22  0:29                                         ` Nick Piggin
2007-10-16  8:19               ` [PATCH] rd: Mark ramdisk buffers heads dirty Nick Piggin
2007-10-16  8:48                 ` Christian Borntraeger
2007-10-16 19:06                 ` Eric W. Biederman
2007-10-16 22:06                   ` Nick Piggin
2007-10-16  8:12             ` [PATCH] rd: Preserve the dirty bit in init_page_buffers() Nick Piggin
2007-10-16  9:35               ` Eric W. Biederman
2007-10-15  9:16   ` [PATCH resend] ramdisk: fix zeroed ramdisk pages on memory pressure Andrew Morton
2007-10-15 15:23     ` Nick Piggin
2007-10-16  3:14       ` Eric W. Biederman
2007-10-16  6:45         ` Nick Piggin
2007-10-16  4:57           ` Eric W. Biederman
2007-10-16  8:08             ` Nick Piggin
2007-10-16  7:47               ` [patch][rfc] rewrite ramdisk Nick Piggin
2007-10-16  7:52                 ` Jan Engelhardt
2007-10-16  8:07                   ` Nick Piggin [this message]
2007-10-16  8:17                     ` Jan Engelhardt
2007-10-16  8:26                       ` Nick Piggin
2007-10-16  8:53                         ` Jan Engelhardt
2007-10-16  9:08                 ` Eric W. Biederman
2007-10-16 21:28                 ` Theodore Tso
2007-10-16 22:08                   ` Nick Piggin
2007-10-16 23:48                     ` Eric W. Biederman
2007-10-17  0:28                       ` Nick Piggin
2007-10-17  1:13                         ` Eric W. Biederman
2007-10-17  1:47                           ` Nick Piggin
2007-10-17 10:30                 ` Eric W. Biederman
2007-10-17 12:49                   ` Nick Piggin
2007-10-17 18:45                     ` Eric W. Biederman
2007-10-18  1:06                       ` Nick Piggin

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=200710161807.41157.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=jengelh@computergmbh.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tytso@mit.edu \
    /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