diff for duplicates of <20110722074227.GW5349@suse.de> diff --git a/a/1.txt b/N1/1.txt index af859be..ca89567 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -3,33 +3,33 @@ On Fri, Jul 22, 2011 at 09:21:57AM +0900, Minchan Kim wrote: > > On Fri, Jul 22, 2011 at 01:36:49AM +0900, Minchan Kim wrote: > >> > > > <SNIP> > >> > > > @@ -2740,17 +2742,23 @@ static int kswapd(void *p) -> >> > > > tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD; -> >> > > > set_freezable(); +> >> > > > tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD; +> >> > > > set_freezable(); > >> > > > -> >> > > > - order = 0; -> >> > > > - classzone_idx = MAX_NR_ZONES - 1; -> >> > > > + order = new_order = 0; -> >> > > > + classzone_idx = new_classzone_idx = pgdat->nr_zones - 1; -> >> > > > for ( ; ; ) { -> >> > > > - unsigned long new_order; -> >> > > > - int new_classzone_idx; -> >> > > > int ret; +> >> > > > - order = 0; +> >> > > > - classzone_idx = MAX_NR_ZONES - 1; +> >> > > > + order = new_order = 0; +> >> > > > + classzone_idx = new_classzone_idx = pgdat->nr_zones - 1; +> >> > > > for ( ; ; ) { +> >> > > > - unsigned long new_order; +> >> > > > - int new_classzone_idx; +> >> > > > int ret; > >> > > > -> >> > > > - new_order = pgdat->kswapd_max_order; -> >> > > > - new_classzone_idx = pgdat->classzone_idx; -> >> > > > - pgdat->kswapd_max_order = 0; -> >> > > > - pgdat->classzone_idx = MAX_NR_ZONES - 1; -> >> > > > + /* -> >> > > > + * If the last balance_pgdat was unsuccessful it's unlikely a -> >> > > > + * new request of a similar or harder type will succeed soon -> >> > > > + * so consider going to sleep on the basis we reclaimed at -> >> > > > + */ -> >> > > > + if (classzone_idx >= new_classzone_idx && order == new_order) { -> >> > > > + new_order = pgdat->kswapd_max_order; -> >> > > > + new_classzone_idx = pgdat->classzone_idx; -> >> > > > + pgdat->kswapd_max_order = 0; -> >> > > > + pgdat->classzone_idx = pgdat->nr_zones - 1; -> >> > > > + } +> >> > > > - new_order = pgdat->kswapd_max_order; +> >> > > > - new_classzone_idx = pgdat->classzone_idx; +> >> > > > - pgdat->kswapd_max_order = 0; +> >> > > > - pgdat->classzone_idx = MAX_NR_ZONES - 1; +> >> > > > + /* +> >> > > > + * If the last balance_pgdat was unsuccessful it's unlikely a +> >> > > > + * new request of a similar or harder type will succeed soon +> >> > > > + * so consider going to sleep on the basis we reclaimed at +> >> > > > + */ +> >> > > > + if (classzone_idx >= new_classzone_idx && order == new_order) { +> >> > > > + new_order = pgdat->kswapd_max_order; +> >> > > > + new_classzone_idx = pgdat->classzone_idx; +> >> > > > + pgdat->kswapd_max_order = 0; +> >> > > > + pgdat->classzone_idx = pgdat->nr_zones - 1; +> >> > > > + } > >> > > > + > >> > > > >> > > But in this part. @@ -55,19 +55,19 @@ On Fri, Jul 22, 2011 at 09:21:57AM +0900, Minchan Kim wrote: > > classzone_idx as communicated back from balance_pgdat() is lost and it > > will not sleep in this ordering of events > > -> > kswapd other processes -> > ====== =============== +> > kswapd other processes +> > ====== =============== > > order = balance_pgdat(pgdat, order, &classzone_idx); -> > wakeup for order-1 +> > wakeup for order-1 > > kswapd balances lower zone -> > allocate from lower zone +> > allocate from lower zone > > balance_pgdat fails balance for highest zone, returns -> > with lower classzone_idx and possibly lower order -> > new_order = pgdat->kswapd_max_order (order == 1) +> > with lower classzone_idx and possibly lower order +> > new_order = pgdat->kswapd_max_order (order == 1) > > new_classzone_idx = pgdat->classzone_idx (highest zone) > > if (order < new_order || classzone_idx > new_classzone_idx) { -> > order = new_order; -> > classzone_idx = new_classzone_idx; (failure from balance_pgdat() lost) +> > order = new_order; +> > classzone_idx = new_classzone_idx; (failure from balance_pgdat() lost) > > } > > order = balance_pgdat(pgdat, order, &classzone_idx); > > @@ -142,3 +142,10 @@ it. -- Mel Gorman SUSE Labs + +-- +To unsubscribe, send a message with 'unsubscribe linux-mm' in +the body to majordomo@kvack.org. For more info on Linux MM, +see: http://www.linux-mm.org/ . +Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ +Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index cfc28ee..6174e36 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -27,33 +27,33 @@ "> > On Fri, Jul 22, 2011 at 01:36:49AM +0900, Minchan Kim wrote:\n" "> >> > > > <SNIP>\n" "> >> > > > @@ -2740,17 +2742,23 @@ static int kswapd(void *p)\n" - "> >> > > > \302\240 \302\240 \302\240 tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;\n" - "> >> > > > \302\240 \302\240 \302\240 set_freezable();\n" + "> >> > > > tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;\n" + "> >> > > > set_freezable();\n" "> >> > > >\n" - "> >> > > > - \302\240 \302\240 order = 0;\n" - "> >> > > > - \302\240 \302\240 classzone_idx = MAX_NR_ZONES - 1;\n" - "> >> > > > + \302\240 \302\240 order = new_order = 0;\n" - "> >> > > > + \302\240 \302\240 classzone_idx = new_classzone_idx = pgdat->nr_zones - 1;\n" - "> >> > > > \302\240 \302\240 \302\240 for ( ; ; ) {\n" - "> >> > > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 unsigned long new_order;\n" - "> >> > > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 int new_classzone_idx;\n" - "> >> > > > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 int ret;\n" + "> >> > > > - order = 0;\n" + "> >> > > > - classzone_idx = MAX_NR_ZONES - 1;\n" + "> >> > > > + order = new_order = 0;\n" + "> >> > > > + classzone_idx = new_classzone_idx = pgdat->nr_zones - 1;\n" + "> >> > > > for ( ; ; ) {\n" + "> >> > > > - unsigned long new_order;\n" + "> >> > > > - int new_classzone_idx;\n" + "> >> > > > int ret;\n" "> >> > > >\n" - "> >> > > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 new_order = pgdat->kswapd_max_order;\n" - "> >> > > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 new_classzone_idx = pgdat->classzone_idx;\n" - "> >> > > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pgdat->kswapd_max_order = 0;\n" - "> >> > > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pgdat->classzone_idx = MAX_NR_ZONES - 1;\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /*\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240* If the last balance_pgdat was unsuccessful it's unlikely a\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240* new request of a similar or harder type will succeed soon\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240* so consider going to sleep on the basis we reclaimed at\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240*/\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (classzone_idx >= new_classzone_idx && order == new_order) {\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 new_order = pgdat->kswapd_max_order;\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 new_classzone_idx = pgdat->classzone_idx;\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pgdat->kswapd_max_order = \302\2400;\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pgdat->classzone_idx = pgdat->nr_zones - 1;\n" - "> >> > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" + "> >> > > > - new_order = pgdat->kswapd_max_order;\n" + "> >> > > > - new_classzone_idx = pgdat->classzone_idx;\n" + "> >> > > > - pgdat->kswapd_max_order = 0;\n" + "> >> > > > - pgdat->classzone_idx = MAX_NR_ZONES - 1;\n" + "> >> > > > + /*\n" + "> >> > > > + * If the last balance_pgdat was unsuccessful it's unlikely a\n" + "> >> > > > + * new request of a similar or harder type will succeed soon\n" + "> >> > > > + * so consider going to sleep on the basis we reclaimed at\n" + "> >> > > > + */\n" + "> >> > > > + if (classzone_idx >= new_classzone_idx && order == new_order) {\n" + "> >> > > > + new_order = pgdat->kswapd_max_order;\n" + "> >> > > > + new_classzone_idx = pgdat->classzone_idx;\n" + "> >> > > > + pgdat->kswapd_max_order = 0;\n" + "> >> > > > + pgdat->classzone_idx = pgdat->nr_zones - 1;\n" + "> >> > > > + }\n" "> >> > > > +\n" "> >> > >\n" "> >> > > But in this part.\n" @@ -79,19 +79,19 @@ "> > classzone_idx as communicated back from balance_pgdat() is lost and it\n" "> > will not sleep in this ordering of events\n" "> >\n" - "> > kswapd \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240other processes\n" - "> > ====== \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240===============\n" + "> > kswapd other processes\n" + "> > ====== ===============\n" "> > order = balance_pgdat(pgdat, order, &classzone_idx);\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240wakeup for order-1\n" + "> > wakeup for order-1\n" "> > kswapd balances lower zone\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240allocate from lower zone\n" + "> > allocate from lower zone\n" "> > balance_pgdat fails balance for highest zone, returns\n" - "> > \302\240 \302\240 \302\240 \302\240with lower classzone_idx and possibly lower order\n" - "> > new_order = pgdat->kswapd_max_order \302\240 \302\240 \302\240(order == 1)\n" + "> > with lower classzone_idx and possibly lower order\n" + "> > new_order = pgdat->kswapd_max_order (order == 1)\n" "> > new_classzone_idx = pgdat->classzone_idx (highest zone)\n" "> > if (order < new_order || classzone_idx > new_classzone_idx) {\n" - "> > \302\240 \302\240 \302\240 \302\240order = new_order;\n" - "> > \302\240 \302\240 \302\240 \302\240classzone_idx = new_classzone_idx; (failure from balance_pgdat() lost)\n" + "> > order = new_order;\n" + "> > classzone_idx = new_classzone_idx; (failure from balance_pgdat() lost)\n" "> > }\n" "> > order = balance_pgdat(pgdat, order, &classzone_idx);\n" "> >\n" @@ -165,6 +165,13 @@ "\n" "-- \n" "Mel Gorman\n" - SUSE Labs + "SUSE Labs\n" + "\n" + "--\n" + "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" + "the body to majordomo@kvack.org. For more info on Linux MM,\n" + "see: http://www.linux-mm.org/ .\n" + "Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/\n" + "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" -473d3f75471d08f4e1d6e2955bf4583676325f5add76cfa71d0803553f4ba4f1 +433e6bb75d74bb1f7e686b1c13f9ed14f10be88b23dfa026b9f1d051aa32cc50
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.