From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Simon Kagstrom <simon.kagstrom@netinsight.net>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
Aaro Koskinen <aaro.koskinen@nokia.com>
Subject: Re: [PATCH v3 2/3]: mtdoops: Make page size configurable
Date: Sun, 11 Oct 2009 13:38:52 +0300 [thread overview]
Message-ID: <1255257532.16942.28.camel@localhost> (raw)
In-Reply-To: <20091008172701.7fbe0f5e@marrow.netinsight.se>
On Thu, 2009-10-08 at 17:27 +0200, Simon Kagstrom wrote:
> The main justification for this is to allow catching long messages
> during a panic, where the top part might otherwise be lost since moving
> to the next block can require a flash erase.
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
> ---
> drivers/mtd/mtdoops.c | 83 +++++++++++++++++++++++++++++++-----------------
> 1 files changed, 53 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
> index 435961e..7045578 100644
> --- a/drivers/mtd/mtdoops.c
> +++ b/drivers/mtd/mtdoops.c
> @@ -32,9 +32,14 @@
> #include <linux/spinlock.h>
> #include <linux/interrupt.h>
> #include <linux/mtd/mtd.h>
> +#include <linux/log2.h>
>
> #define MTDOOPS_KERNMSG_MAGIC 0x5d005d00
> -#define OOPS_PAGE_SIZE 4096
> +
> +static int mtdoops_page_size = 4096;
> +module_param(mtdoops_page_size, int, 0);
> +MODULE_PARM_DESC(mtdoops_page_size,
> + "page size for MTD OOPS pages in bytes (default 4096)");
Term "page" is so overloaded. I'd avoid exporting parameters with "page"
in the name. Could we please call them "records"? At least for the names
we export to users. Of course, ideally you would re-name all symbols in
mtdoops which use "page" term to use "record" term.
Also, the module is called "mtdoops", so it makes little sense to prefix
parameter names with "mtdoops". E.g., if you pass the parameter via the
kernel command line, with current naming you will have:
mtdoops.mtdoops_page_size
Too long, unreadable, confusing :-)
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-10-11 10:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 14:05 [PATCH 0/3]: mtdoops fixes and improvements Simon Kagstrom
2009-10-02 14:06 ` [PATCH 1/3]: mtdoops: Make page size configurable Simon Kagstrom
2009-10-08 5:17 ` Artem Bityutskiy
2009-10-02 14:06 ` [PATCH 2/3]: mtdoops: Use panic_write if panic_on_oops is set Simon Kagstrom
2009-10-08 5:28 ` Artem Bityutskiy
2009-10-08 6:38 ` Simon Kagstrom
2009-10-11 6:00 ` Artem Bityutskiy
2009-10-12 6:23 ` Simon Kagstrom
2009-10-02 14:07 ` [PATCH 3/3]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
2009-10-06 12:37 ` Simon Kagstrom
2009-10-06 14:50 ` [PATCH v2 " Simon Kagstrom
2009-10-08 14:42 ` [PATCH v2 0/3]: mtdoops fixes and improvements Simon Kagstrom
2009-10-08 14:44 ` [PATCH v2 1/3]: mtdoops: Keep track of clean/dirty mtdoops pages in an array Simon Kagstrom
2009-10-08 14:45 ` [PATCH v2 2/3]: mtdoops: Make page size configurable Simon Kagstrom
2009-10-08 14:45 ` [PATCH v2 3/3]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
2009-10-08 15:15 ` [PATCH v2 0/3]: mtdoops fixes and improvements Simon Kagstrom
2009-10-08 15:25 ` [PATCH v3 " Simon Kagstrom
2009-10-08 15:26 ` [PATCH v3 1/3]: mtdoops: Keep track of clean/dirty mtdoops pages in an array Simon Kagstrom
2009-10-11 10:29 ` Artem Bityutskiy
2009-10-08 15:27 ` [PATCH v3 2/3]: mtdoops: Make page size configurable Simon Kagstrom
2009-10-11 10:38 ` Artem Bityutskiy [this message]
2009-10-08 15:27 ` [PATCH v3 3/3]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
2009-10-11 10:04 ` [PATCH v3 0/3]: mtdoops fixes and improvements Artem Bityutskiy
2009-10-11 11:02 ` Artem Bityutskiy
2009-10-12 11:06 ` [PATCH v4 " Simon Kagstrom
2009-10-12 11:07 ` [PATCH v4 1/4]: mtdoops: avoid erasing already empty areas Simon Kagstrom
2009-10-12 11:09 ` [PATCH v4 2/4]: mtdoops: Keep track of used/unused mtdoops pages in an array Simon Kagstrom
2009-10-12 11:09 ` [PATCH v4 3/4]: mtdoops: Make page (record) size configurable Simon Kagstrom
2009-10-12 11:09 ` [PATCH v4 4/4]: mtdoops: store all kernel messages in a circular buffer Simon Kagstrom
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=1255257532.16942.28.camel@localhost \
--to=artem.bityutskiy@nokia.com \
--cc=aaro.koskinen@nokia.com \
--cc=linux-mtd@lists.infradead.org \
--cc=simon.kagstrom@netinsight.net \
/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