* [patch 1/10] suppress allocation warnings for radix-tree allocations
@ 2002-05-05 20:53 Andrew Morton
2002-05-05 21:51 ` Daniel Phillips
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2002-05-05 20:53 UTC (permalink / raw)
To: Linus Torvalds; +Cc: lkml
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.
=====================================
--- 2.5.13/mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002
+++ 2.5.13-akpm/mm/vmscan.c Sun May 5 13:31:59 2002
@@ -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;
--- 2.5.13/mm/page_alloc.c~radix-tree-warning Sun May 5 13:31:59 2002
+++ 2.5.13-akpm/mm/page_alloc.c Sun May 5 13:32:36 2002
@@ -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;
}
--- 2.5.13/include/linux/sched.h~radix-tree-warning Sun May 5 13:31:59 2002
+++ 2.5.13-akpm/include/linux/sched.h Sun May 5 13:32:15 2002
@@ -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
-
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/10] suppress allocation warnings for radix-tree allocations
2002-05-05 20:53 [patch 1/10] suppress allocation warnings for radix-tree allocations Andrew Morton
@ 2002-05-05 21:51 ` Daniel Phillips
2002-05-05 22:06 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Phillips @ 2002-05-05 21:51 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: lkml
On Sunday 05 May 2002 22:53, Andrew Morton wrote:
> 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.
>
> =====================================
>
> --- 2.5.13/mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002
> +++ 2.5.13-akpm/mm/vmscan.c Sun May 5 13:31:59 2002
> @@ -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'?
--
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/10] suppress allocation warnings for radix-tree allocations
2002-05-05 21:51 ` Daniel Phillips
@ 2002-05-05 22:06 ` Andrew Morton
2002-05-05 22:51 ` Anton Altaparmakov
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2002-05-05 22:06 UTC (permalink / raw)
To: Daniel Phillips; +Cc: lkml
Daniel Phillips wrote:
>
> On Sunday 05 May 2002 22:53, Andrew Morton wrote:
> > 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.
> >
> > =====================================
> >
> > --- 2.5.13/mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002
> > +++ 2.5.13-akpm/mm/vmscan.c Sun May 5 13:31:59 2002
> > @@ -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'?
>
Yup, that would make more sense.
Or __GFP_I_DONT_REALLY_CARE ;)
-
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/10] suppress allocation warnings for radix-tree allocations
2002-05-05 22:06 ` Andrew Morton
@ 2002-05-05 22:51 ` Anton Altaparmakov
0 siblings, 0 replies; 4+ messages in thread
From: Anton Altaparmakov @ 2002-05-05 22:51 UTC (permalink / raw)
To: Andrew Morton; +Cc: Daniel Phillips, lkml
At 23:06 05/05/02, Andrew Morton wrote:
>Daniel Phillips wrote:
> >
> > On Sunday 05 May 2002 22:53, Andrew Morton wrote:
> > > 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.
> > >
> > > =====================================
> > >
> > > --- 2.5.13/mm/vmscan.c~radix-tree-warning Sun May 5 13:31:59 2002
> > > +++ 2.5.13-akpm/mm/vmscan.c Sun May 5 13:31:59 2002
> > > @@ -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'?
> >
>
>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
--
"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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-05 22:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-05 20:53 [patch 1/10] suppress allocation warnings for radix-tree allocations Andrew Morton
2002-05-05 21:51 ` Daniel Phillips
2002-05-05 22:06 ` Andrew Morton
2002-05-05 22:51 ` Anton Altaparmakov
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).