Skip to contentSkip to conversation

suppress allocation warnings for radix-tree allocations

PATCH In review Andrew Morton 3 participants 4 messages May 5, 2002

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/10 suppress allocation warnings for radix-tree allocations

The recently-added page allocation failure warning generates a lot of noise due to radix-tree node allocation failures. Those messages are not interesting.

But I think the warning is otherwise useful - "I got an allocation failure and then it crashed" is better than "it crashed".

The patch suppresses the message for ratnode allocation failures.

=====================================

mm/vmscan.c renamed from mm/vmscan.c~radix-tree-warning +1 -0
@@ -58,6 +58,7 @@ swap_out_add_to_swap_cache(struct page *
 	int ret;
 
 	current->flags &= ~PF_MEMALLOC;
+	current->flags |= PF_RADIX_TREE;
 	ret = add_to_swap_cache(page, entry);
 	current->flags = flags;
 	return ret;
mm/page_alloc.c renamed from mm/page_alloc.c~radix-tree-warning +5 -2
@@ -396,8 +396,11 @@ rebalance:
 				return page;
 		}
 nopage:
-		printk("%s: page allocation failure. order:%d, mode:0x%x\n",
-			current->comm, order, gfp_mask);
+		if (!(current->flags & PF_RADIX_TREE)) {
+			printk("%s: page allocation failure."
+				" order:%d, mode:0x%x\n",
+				current->comm, order, gfp_mask);
+		}
 		return NULL;
 	}
 
include/linux/sched.h renamed from include/linux/sched.h~radix-tree-warning +1 -0
@@ -371,6 +371,7 @@ do { if (atomic_dec_and_test(&(tsk)->usa
 #define PF_MEMDIE	0x00001000	/* Killed for out-of-memory */
 #define PF_FREE_PAGES	0x00002000	/* per process page freeing */
 #define PF_FLUSHER	0x00004000	/* responsible for disk writeback */
+#define PF_RADIX_TREE	0x00008000	/* debug: performing radix tree alloc */
 
 /*
  * Ptrace flags

-

#1 lore raw
Quoted 14 lines · Andrew Morton

The recently-added page allocation failure warning generates a lot of noise due to radix-tree node allocation failures. Those messages are not interesting.

But I think the warning is otherwise useful - "I got an allocation failure and then it crashed" is better than "it crashed".

The patch suppresses the message for ratnode allocation failures.

=====================================

mm/vmscan.c swap_out_add_to_swap_cache(struct page * · line 61

Quoted 4 lines
mm/vmscan.c renamed from mm/vmscan.c~radix-tree-warning +1 -0
@@ -58,6 +58,7 @@ swap_out_add_to_swap_cache(struct page *
 	int ret;
 
 	current->flags &= ~PF_MEMALLOC;
+	current->flags |= PF_RADIX_TREE;

Isn't that really 'PF_NO_WARN_ALLOC'?

Signature · 1 line
Daniel
#2 lore raw
In reply to Andrew Morton
Quoted 18 lines · Daniel Phillips
Quoted 16 lines · Andrew Morton

The recently-added page allocation failure warning generates a lot of noise due to radix-tree node allocation failures. Those messages are not interesting.

But I think the warning is otherwise useful - "I got an allocation failure and then it crashed" is better than "it crashed".

The patch suppresses the message for ratnode allocation failures.

=====================================

mm/vmscan.c Sun May 5 13:31:59 2002 renamed from mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002 +0 -0
@@ -58,6 +58,7 @@ swap_out_add_to_swap_cache(struct page *
      int ret;
 
Quoted 5 lines

mm/vmscan.c Sun May 5 13:31:59 2002 swap_out_add_to_swap_cache(struct page * · line 61

Quoted 2 lines
mm/vmscan.c Sun May 5 13:31:59 2002 renamed from mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002 +1 -0
      current->flags &= ~PF_MEMALLOC;
+     current->flags |= PF_RADIX_TREE;

Isn't that really 'PF_NO_WARN_ALLOC'?

Yup, that would make more sense.

Or __GFP_I_DONT_REALLY_CARE ;)

-

#3 lore raw
Quoted 25 lines · Andrew Morton
Quoted 18 lines · Daniel Phillips
Quoted 16 lines · Andrew Morton

The recently-added page allocation failure warning generates a lot of noise due to radix-tree node allocation failures. Those messages are not interesting.

But I think the warning is otherwise useful - "I got an allocation failure and then it crashed" is better than "it crashed".

The patch suppresses the message for ratnode allocation failures.

=====================================

mm/vmscan.c Sun May 5 13:31:59 2002 renamed from mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002 +0 -0
@@ -58,6 +58,7 @@ swap_out_add_to_swap_cache(struct page *
      int ret;
 
Quoted 5 lines

mm/vmscan.c Sun May 5 13:31:59 2002 swap_out_add_to_swap_cache(struct page * · line 61

Quoted 2 lines
mm/vmscan.c Sun May 5 13:31:59 2002 renamed from mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002 +1 -0
      current->flags &= ~PF_MEMALLOC;
+     current->flags |= PF_RADIX_TREE;

Isn't that really 'PF_NO_WARN_ALLOC'?

Quoted 3 lines

Yup, that would make more sense.

Or __GFP_I_DONT_REALLY_CARE ;)

Surely this is only a temporary flag which together with the warning message will disappear later on so debating about its name is, err, silly? (((-;

Anton

Signature · 5 lines
  "I've not lost my mind. It's backed up on tape somewhere." - Unknown
-- 
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS Maintainer / IRC: #ntfs on irc.openprojects.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/