linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Suspend2][ 0/7] Proc file support
@ 2006-06-26 16:47 Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 1/7] [Suspend2] Proc.c header Nigel Cunningham
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel


Generic routines for implementing the /proc/suspend2 files that allow
the user to configure and tune the subsystem according to their needs.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Suspend2][ 1/7] [Suspend2] Proc.c header.
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 2/7] [Suspend2] Read a proc file entry Nigel Cunningham
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

Suspend2 uses shared routines to handle reading and writing proc entries,
and a simple data structure to define the properties of entries, including
data type, constraints on values and specific routines to be called as side
effects.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.c b/kernel/power/proc.c
new file mode 100644
index 0000000..16ad90e
--- /dev/null
+++ b/kernel/power/proc.c
@@ -0,0 +1,30 @@
+/*
+ * kernel/power/proc.c
+ *
+ * Copyright (C) 2002-2006 Nigel Cunningham <nigel@suspend2.net>
+ *
+ * This file is released under the GPLv2.
+ *
+ * This file contains support for proc entries for tuning Suspend2.
+ *
+ * We have a generic handler that deals with the most common cases, and
+ * hooks for special handlers to use.
+ */
+
+#include <linux/suspend.h>
+#include <linux/module.h>
+#include <asm/uaccess.h>
+
+#include "proc.h"
+#include "suspend2.h"
+#include "storage.h"
+
+static int suspend_proc_initialised = 0;
+
+static struct list_head suspend_proc_entries;
+static struct proc_dir_entry *suspend_dir;
+static struct suspend_proc_data proc_params[];
+
+extern void __suspend_try_resume(void);
+extern void suspend_main(void);
+

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Suspend2][ 2/7] [Suspend2] Read a proc file entry.
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 1/7] [Suspend2] Proc.c header Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 3/7] [Suspend2] Proc write routine Nigel Cunningham
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

Generic (within Suspend2) routine for reading a proc file entry all our
proc entries use this routine, so there is no duplication of code at all.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.c |   70 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.c b/kernel/power/proc.c
index 16ad90e..e072b50 100644
--- a/kernel/power/proc.c
+++ b/kernel/power/proc.c
@@ -28,3 +28,73 @@ static struct suspend_proc_data proc_par
 extern void __suspend_try_resume(void);
 extern void suspend_main(void);
 
+/* suspend_read_proc
+ *
+ * Generic handling for reading the contents of bits, integers,
+ * unsigned longs and strings.
+ */
+static int suspend_read_proc(char *page, char **start, off_t off, int count,
+		int *eof, void *data)
+{
+	int len = 0;
+	struct suspend_proc_data *proc_data = (struct suspend_proc_data *) data;
+
+	if (suspend_start_anything(0))
+		return -EBUSY;
+	
+	if (proc_data->needs_storage_manager & 1)
+		suspend_prepare_usm();
+	
+	switch (proc_data->type) {
+		case SUSPEND_PROC_DATA_CUSTOM:
+			if (proc_data->data.special.read_proc) {
+				read_proc_t *read_proc = proc_data->data.special.read_proc;
+				len = read_proc(page, start, off, count, eof, data);
+			} else
+				len = 0;
+			break;
+		case SUSPEND_PROC_DATA_BIT:
+			len = sprintf(page, "%d\n", 
+				-test_bit(proc_data->data.bit.bit,
+					proc_data->data.bit.bit_vector));
+			break;
+		case SUSPEND_PROC_DATA_INTEGER:
+			{
+				int *variable = proc_data->data.integer.variable;
+				len = sprintf(page, "%d\n", *variable);
+				break;
+			}
+		case SUSPEND_PROC_DATA_LONG:
+			{
+				long *variable = proc_data->data.a_long.variable;
+				len = sprintf(page, "%ld\n", *variable);
+				break;
+			}
+		case SUSPEND_PROC_DATA_UL:
+			{
+				long *variable = proc_data->data.ul.variable;
+				len = sprintf(page, "%lu\n", *variable);
+				break;
+			}
+		case SUSPEND_PROC_DATA_STRING:
+			{
+				char *variable = proc_data->data.string.variable;
+				len = sprintf(page, "%s\n", variable);
+				break;
+			}
+	}
+	/* Side effect routine? */
+	if (proc_data->read_proc)
+		proc_data->read_proc();
+	
+	if (len <= count)
+		*eof = 1;
+	
+	if (proc_data->needs_storage_manager & 1)
+		suspend_cleanup_usm();
+
+	suspend_finish_anything(0);
+	
+	return len;
+}
+

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Suspend2][ 3/7] [Suspend2] Proc write routine
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 1/7] [Suspend2] Proc.c header Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 2/7] [Suspend2] Read a proc file entry Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 4/7] [Suspend2] Basic (do_suspend/do_resume) entries Nigel Cunningham
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

The proc write routine shared by all Suspend2 proc entries.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.c |  133 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 133 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.c b/kernel/power/proc.c
index e072b50..cdbf9cf 100644
--- a/kernel/power/proc.c
+++ b/kernel/power/proc.c
@@ -98,3 +98,136 @@ static int suspend_read_proc(char *page,
 	return len;
 }
 
+/* suspend_write_proc
+ *
+ * Generic routine for handling writing to files representing
+ * bits, integers and unsigned longs.
+ */
+
+static int suspend_write_proc(struct file *file, const char *buffer,
+		unsigned long count, void *data)
+{
+	struct suspend_proc_data *proc_data = (struct suspend_proc_data *) data;
+	char *my_buf = (char *) get_zeroed_page(GFP_ATOMIC);
+	int result = count, assigned_temp_buffer = 0;
+
+	if (!my_buf)
+		return -ENOMEM;
+
+	if (count > PAGE_SIZE)
+		count = PAGE_SIZE;
+
+	if (copy_from_user(my_buf, buffer, count))
+		return -EFAULT;
+	
+	if (suspend_start_anything(proc_data == &proc_params[0]))
+		return -EBUSY;
+
+	my_buf[count] = 0;
+
+	if (proc_data->needs_storage_manager & 2)
+		suspend_prepare_usm();
+
+	switch (proc_data->type) {
+		case SUSPEND_PROC_DATA_CUSTOM:
+			if (proc_data->data.special.write_proc) {
+				write_proc_t *write_proc = proc_data->data.special.write_proc;
+				result = write_proc(file, buffer, count, data);
+			}
+			break;
+		case SUSPEND_PROC_DATA_BIT:
+			{
+			int value = simple_strtoul(my_buf, NULL, 0);
+			if (value)
+				set_bit(proc_data->data.bit.bit, 
+					(proc_data->data.bit.bit_vector));
+			else
+				clear_bit(proc_data->data.bit.bit,
+					(proc_data->data.bit.bit_vector));
+			}
+			break;
+		case SUSPEND_PROC_DATA_INTEGER:
+			{
+				int *variable = proc_data->data.integer.variable;
+				int minimum = proc_data->data.integer.minimum;
+				int maximum = proc_data->data.integer.maximum;
+				*variable = simple_strtol(my_buf, NULL, 0);
+
+				if (maximum && ((*variable) < minimum))
+					*variable = minimum;
+
+				if (maximum && ((*variable) > maximum))
+					*variable = maximum;
+				break;
+			}
+		case SUSPEND_PROC_DATA_LONG:
+			{
+				long *variable = proc_data->data.a_long.variable;
+				long minimum = proc_data->data.a_long.minimum;
+				long maximum = proc_data->data.a_long.maximum;
+				*variable = simple_strtol(my_buf, NULL, 0);
+
+				if (maximum && ((*variable) < minimum))
+					*variable = minimum;
+
+				if (maximum && ((*variable) > maximum))
+					*variable = maximum;
+				break;
+			}
+		case SUSPEND_PROC_DATA_UL:
+			{
+				unsigned long *variable = proc_data->data.ul.variable;
+				unsigned long minimum = proc_data->data.ul.minimum;
+				unsigned long maximum = proc_data->data.ul.maximum;
+				*variable = simple_strtoul(my_buf, NULL, 0);
+
+				if (maximum && ((*variable) < minimum))
+					*variable = minimum;
+
+				if (maximum && ((*variable) > maximum))
+					*variable = maximum;
+				break;
+			}
+			break;
+		case SUSPEND_PROC_DATA_STRING:
+			{
+				int copy_len = count;
+				char *variable =
+					proc_data->data.string.variable;
+
+				if (proc_data->data.string.max_length &&
+				    (copy_len > proc_data->data.string.max_length))
+					copy_len = proc_data->data.string.max_length;
+
+				if (!variable) {
+					proc_data->data.string.variable =
+						variable = (char *) get_zeroed_page(GFP_ATOMIC);
+					assigned_temp_buffer = 1;
+				}
+				strncpy(variable, my_buf, copy_len);
+				if ((copy_len) &&
+					 (my_buf[copy_len - 1] == '\n'))
+					variable[count - 1] = 0;
+				variable[count] = 0;
+			}
+			break;
+	}
+	free_page((unsigned long) my_buf);
+	/* Side effect routine? */
+	if (proc_data->write_proc)
+		proc_data->write_proc();
+
+	/* Free temporary buffers */
+	if (assigned_temp_buffer) {
+		free_page((unsigned long) proc_data->data.string.variable);
+		proc_data->data.string.variable = NULL;
+	}
+
+	if (proc_data->needs_storage_manager & 2)
+		suspend_cleanup_usm();
+
+	suspend_finish_anything(proc_data == &proc_params[0]);
+	
+	return result;
+}
+

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Suspend2][ 4/7] [Suspend2] Basic (do_suspend/do_resume) entries.
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
                   ` (2 preceding siblings ...)
  2006-06-26 16:47 ` [Suspend2][ 3/7] [Suspend2] Proc write routine Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 5/7] [Suspend2] Initialise the proc directories & basic entries Nigel Cunningham
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

Define the two basic proc entries for Suspend2. Without these, nothing
useful will be done ;).

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.c b/kernel/power/proc.c
index cdbf9cf..85301a9 100644
--- a/kernel/power/proc.c
+++ b/kernel/power/proc.c
@@ -231,3 +231,28 @@ static int suspend_write_proc(struct fil
 	return result;
 }
 
+/* Non-module proc entries.
+ *
+ * This array contains entries that are automatically registered at
+ * boot. Modules and the console code register their own entries separately.
+ *
+ * NB: If you move do_suspend, change suspend_write_proc's test so that
+ * suspend_start_anything still gets a 1 when the user echos > do_suspend!
+ */
+
+static struct suspend_proc_data proc_params[] = {
+	{ .filename			= "do_suspend",
+	  .permissions			= PROC_WRITEONLY,
+	  .type				= SUSPEND_PROC_DATA_CUSTOM,
+	  .write_proc			= suspend_main,
+	  .needs_storage_manager	= 2,
+	},
+
+	{ .filename			= "do_resume",
+	  .permissions			= PROC_WRITEONLY,
+	  .type				= SUSPEND_PROC_DATA_CUSTOM,
+	  .write_proc			= __suspend_try_resume,
+	  .needs_storage_manager	= 2,
+	},
+};
+       

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Suspend2][ 5/7] [Suspend2] Initialise the proc directories & basic entries.
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
                   ` (3 preceding siblings ...)
  2006-06-26 16:47 ` [Suspend2][ 4/7] [Suspend2] Basic (do_suspend/do_resume) entries Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 6/7] [Suspend2] Register and remove proc file functions Nigel Cunningham
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

Initialise the Suspend2 proc entries - create the directory and register
the do_suspend and do_resume files.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.c b/kernel/power/proc.c
index 85301a9..dad818f 100644
--- a/kernel/power/proc.c
+++ b/kernel/power/proc.c
@@ -256,3 +256,28 @@ static struct suspend_proc_data proc_par
 	},
 };
        
+/* suspend_initialise_proc
+ *
+ * Initialise the /proc/suspend2 directory.
+ */
+
+static void suspend_initialise_proc(void)
+{
+	int i;
+	int numfiles = sizeof(proc_params) / sizeof(struct suspend_proc_data);
+	
+	if (suspend_proc_initialised)
+		return;
+
+	suspend_dir = proc_mkdir("suspend2", NULL);
+	
+	BUG_ON(!suspend_dir);
+
+	INIT_LIST_HEAD(&suspend_proc_entries);
+
+	suspend_proc_initialised = 1;
+
+	for (i=0; i< numfiles; i++)
+		suspend_register_procfile(&proc_params[i]);
+}
+

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Suspend2][ 6/7] [Suspend2] Register and remove proc file functions.
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
                   ` (4 preceding siblings ...)
  2006-06-26 16:47 ` [Suspend2][ 5/7] [Suspend2] Initialise the proc directories & basic entries Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 16:47 ` [Suspend2][ 7/7] [Suspend2] Suspend2 proc.h Nigel Cunningham
  2006-06-26 20:07 ` [Suspend2][ 0/7] Proc file support Rafael J. Wysocki
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

Functions to add and remove a Suspend2 proc file entry.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.c |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.c b/kernel/power/proc.c
index dad818f..9722377 100644
--- a/kernel/power/proc.c
+++ b/kernel/power/proc.c
@@ -281,3 +281,47 @@ static void suspend_initialise_proc(void
 		suspend_register_procfile(&proc_params[i]);
 }
 
+/* suspend_register_procfile
+ *
+ * Helper for registering a new /proc/suspend2 entry.
+ */
+
+struct proc_dir_entry *suspend_register_procfile(
+		struct suspend_proc_data *suspend_proc_data)
+{
+	struct proc_dir_entry *new_entry;
+	
+	if (!suspend_proc_initialised)
+		suspend_initialise_proc();
+
+	new_entry = create_proc_entry(
+			suspend_proc_data->filename,
+			suspend_proc_data->permissions, 
+			suspend_dir);
+	if (new_entry) {
+		list_add_tail(&suspend_proc_data->proc_data_list, &suspend_proc_entries);
+		new_entry->read_proc = suspend_read_proc;
+		new_entry->write_proc = suspend_write_proc;
+		new_entry->data = suspend_proc_data;
+	} else {
+		printk("Error! create_proc_entry returned NULL.\n");
+		INIT_LIST_HEAD(&suspend_proc_data->proc_data_list);
+	}
+	return new_entry;
+}
+
+/* suspend_unregister_procfile
+ *
+ * Helper for removing unwanted /proc/suspend2 entries.
+ *
+ */
+void suspend_unregister_procfile(struct suspend_proc_data *suspend_proc_data)
+{
+	if (list_empty(&suspend_proc_data->proc_data_list))
+		return;
+
+	remove_proc_entry(
+		suspend_proc_data->filename,
+		suspend_dir);
+	list_del(&suspend_proc_data->proc_data_list);
+}

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Suspend2][ 7/7] [Suspend2] Suspend2 proc.h
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
                   ` (5 preceding siblings ...)
  2006-06-26 16:47 ` [Suspend2][ 6/7] [Suspend2] Register and remove proc file functions Nigel Cunningham
@ 2006-06-26 16:47 ` Nigel Cunningham
  2006-06-26 20:07 ` [Suspend2][ 0/7] Proc file support Rafael J. Wysocki
  7 siblings, 0 replies; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 16:47 UTC (permalink / raw)
  To: linux-kernel

Header file for Suspend2 proc entries - define the data structure used to
define our proc entries, flags and the register/unregister routines.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/proc.h |   76 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/kernel/power/proc.h b/kernel/power/proc.h
new file mode 100644
index 0000000..688f8d2
--- /dev/null
+++ b/kernel/power/proc.h
@@ -0,0 +1,76 @@
+/*
+ * kernel/power/proc.h
+ *
+ * Copyright (C) 2004-2006 Nigel Cunningham <nigel@suspend2.net>
+ *
+ * This file is released under the GPLv2.
+ *
+ * It provides declarations for suspend to use in managing
+ * /proc/suspend2. When we switch to kobjects,
+ * this will become redundant.
+ *
+ */
+
+#include <linux/proc_fs.h>
+
+struct suspend_proc_data {
+	char *filename;
+	int permissions;
+	int type;
+	int needs_storage_manager;
+	union {
+		struct {
+			unsigned long *bit_vector;
+			int bit;
+		} bit;
+		struct {
+			int *variable;
+			int minimum;
+			int maximum;
+		} integer;
+		struct {
+			long *variable;
+			long minimum;
+			long maximum;
+		} a_long;
+		struct {
+			unsigned long *variable;
+			unsigned long minimum;
+			unsigned long maximum;
+		} ul;
+		struct {
+			char *variable;
+			int max_length;
+		} string;
+		struct {
+			read_proc_t *read_proc;
+			write_proc_t *write_proc;
+			void *data;
+		} special;
+	} data;
+	
+	/* Side effects routines. Used, eg, for reparsing the
+	 * resume2 entry when it changes */
+	void (*read_proc) (void);
+	void (*write_proc) (void); 
+	struct list_head proc_data_list;
+};
+
+enum {
+	SUSPEND_PROC_DATA_NONE,
+	SUSPEND_PROC_DATA_CUSTOM,
+	SUSPEND_PROC_DATA_BIT,
+	SUSPEND_PROC_DATA_INTEGER,
+	SUSPEND_PROC_DATA_UL,
+	SUSPEND_PROC_DATA_LONG,
+	SUSPEND_PROC_DATA_STRING
+};
+
+#define PROC_WRITEONLY 0200
+#define PROC_READONLY 0400
+#define PROC_RW 0600
+
+struct proc_dir_entry *suspend_register_procfile(
+		struct suspend_proc_data *suspend_proc_data);
+void suspend_unregister_procfile(struct suspend_proc_data *suspend_proc_data);
+

--
Nigel Cunningham		nigel at suspend2 dot net

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Suspend2][ 0/7] Proc file support
  2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
                   ` (6 preceding siblings ...)
  2006-06-26 16:47 ` [Suspend2][ 7/7] [Suspend2] Suspend2 proc.h Nigel Cunningham
@ 2006-06-26 20:07 ` Rafael J. Wysocki
  2006-06-26 22:50   ` Nigel Cunningham
  7 siblings, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2006-06-26 20:07 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: linux-kernel

On Monday 26 June 2006 18:47, Nigel Cunningham wrote:
> 
> Generic routines for implementing the /proc/suspend2 files that allow
> the user to configure and tune the subsystem according to their needs.

All of the following patches seem to modify the same file: kernel/power/proc.c
I'd prefer if these changes were all done in one patch.

Rafael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Suspend2][ 0/7] Proc file support
  2006-06-26 20:07 ` [Suspend2][ 0/7] Proc file support Rafael J. Wysocki
@ 2006-06-26 22:50   ` Nigel Cunningham
  2006-06-27 21:00     ` Rafael J. Wysocki
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel Cunningham @ 2006-06-26 22:50 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

Hi.

On Tuesday 27 June 2006 06:07, Rafael J. Wysocki wrote:
> On Monday 26 June 2006 18:47, Nigel Cunningham wrote:
> > Generic routines for implementing the /proc/suspend2 files that allow
> > the user to configure and tune the subsystem according to their needs.
>
> All of the following patches seem to modify the same file:
> kernel/power/proc.c I'd prefer if these changes were all done in one patch.
>
> Rafael

I've done this with all the new files, so that each part of the file can be 
considered without suffering from overload.

Regards,

Nigel

-- 
See http://www.suspend2.net for Howtos, FAQs, mailing
lists, wiki and bugzilla info.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Suspend2][ 0/7] Proc file support
  2006-06-26 22:50   ` Nigel Cunningham
@ 2006-06-27 21:00     ` Rafael J. Wysocki
  0 siblings, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2006-06-27 21:00 UTC (permalink / raw)
  To: nigel; +Cc: linux-kernel

On Tuesday 27 June 2006 00:50, Nigel Cunningham wrote:
> Hi.
> 
> On Tuesday 27 June 2006 06:07, Rafael J. Wysocki wrote:
> > On Monday 26 June 2006 18:47, Nigel Cunningham wrote:
> > > Generic routines for implementing the /proc/suspend2 files that allow
> > > the user to configure and tune the subsystem according to their needs.
> >
> > All of the following patches seem to modify the same file:
> > kernel/power/proc.c I'd prefer if these changes were all done in one patch.
> >
> > Rafael
> 
> I've done this with all the new files, so that each part of the file can be 
> considered without suffering from overload.

Well, different parts of the same file tend to depend on each other and it's
sometimes hard to follow the dependencies if they are in different patches.

Rafael

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-06-27 21:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 16:47 [Suspend2][ 0/7] Proc file support Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 1/7] [Suspend2] Proc.c header Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 2/7] [Suspend2] Read a proc file entry Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 3/7] [Suspend2] Proc write routine Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 4/7] [Suspend2] Basic (do_suspend/do_resume) entries Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 5/7] [Suspend2] Initialise the proc directories & basic entries Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 6/7] [Suspend2] Register and remove proc file functions Nigel Cunningham
2006-06-26 16:47 ` [Suspend2][ 7/7] [Suspend2] Suspend2 proc.h Nigel Cunningham
2006-06-26 20:07 ` [Suspend2][ 0/7] Proc file support Rafael J. Wysocki
2006-06-26 22:50   ` Nigel Cunningham
2006-06-27 21:00     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).