lkml.org 
[lkml]   [2000]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
On Sun, Sep 03, 2000 at 09:34:29PM -0400, Alexander Viro wrote:

Too bad that counter on struct page is impossible to grep for -
(->|\.)[ ]*count\>
gives more than 2600 instances ;-/
There are several other structures that have the same problem; very
generic sounding members. I wonder would a patch changing struct page
to something like this be acceptable?

--- mm.h.orig Wed Sep 6 07:01:38 2000
+++ mm.h Wed Sep 6 07:02:18 2000
@@ -142,18 +142,18 @@
* is used for linear searches (eg. clock algorithm scans).
*/
typedef struct page {
- struct list_head list;
- struct address_space *mapping;
- unsigned long index;
- struct page *next_hash;
- atomic_t count;
- unsigned long flags; /* atomic flags, some possibly updated asynchronously */
- struct list_head lru;
- wait_queue_head_t wait;
- struct page **pprev_hash;
- struct buffer_head * buffers;
- void *virtual; /* non-NULL if kmapped */
- struct zone_struct *zone;
+ struct list_head p_list;
+ struct address_space *p_mapping;
+ unsigned long p_index;
+ struct page *p_next_hash;
+ atomic_t p_count;
+ unsigned long p_flags; /* atomic flags, some possibly updated asynchronously */
+ struct list_head p_lru;
+ wait_queue_head_t p_wait;
+ struct page **p_pprev_hash;
+ struct buffer_head * p_buffers;
+ void *p_virtual; /* non-NULL if kmapped */
+ struct zone_struct *p_zone;
} mem_map_t;

#define get_page(p) atomic_inc(&(p)->count)



--cw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [from the cache]
©2003-2011 Jasper Spaans