Re: [PATCH] reduce sizeof(struct file)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Dumazet wrote:

--- linux-2.6.14-rc2-orig/include/linux/fs.h	2005-09-20 05:00:41.000000000 +0200
+++ linux-2.6.14-rc2/include/linux/fs.h	2005-09-24 04:52:20.000000000 +0200
@@ -574,7 +574,13 @@
 #define RA_FLAG_INCACHE 0x02	/* file is already in cache */
struct file {
-	struct list_head	f_list;
+/*
+ * f_list and f_rcuhead can share the same memory location
+ */
+	union {
+		struct list_head	fu_list;
+		struct rcu_head 	fu_rcuhead;
+		} f_u;

I don't think you need to explain this basic C semantic to
the reader if they have gotten this far ;)

Instead, explain when fu_list and fu_rcuhead are used.
Something along the lines of

/*
 * fu_list becomes invalid after file_free is called
 * and queued via fu_rcuhead for RCU freeing
 */

Nick

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux