~ubuntu-branches/ubuntu/raring/linux-ti-omap4/raring-proposed

« back to all changes in this revision

Viewing changes to mm/vmscan.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.5.0-22.34
  • Date: 2013-01-11 15:02:20 UTC
  • mfrom: (72.1.1 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20130111150220-kgmbtlwhyc4kwqhg
Tags: 3.5.0-217.25
* Release Tracking Bug
  - LP: #1097912

[ Paolo Pisati ]

* rebased on Ubuntu-3.5.0-22.34

[ Ubuntu: 3.5.0-22.34 ]

* Release Tracking Bug
  - LP: #1097343
* Revert "SAUCE: fsnotify: dont put marks on temporary list when clearing
  marks by group"
  - LP: #1096137
* Revert "SAUCE: fsnotify: introduce locked versions of
  fsnotify_add_mark() and fsnotify_remove_mark()"
  - LP: #1096137
* Revert "SAUCE: fsnotify: pass group to fsnotify_destroy_mark()"
  - LP: #1096137
* Revert "SAUCE: fsnotify: use a mutex instead of a spinlock to protect a
  groups mark list"
  - LP: #1096137
* Revert "SAUCE: fanotify: add an extra flag to mark_remove_from_mask
  that indicates wheather a mark should be destroyed"
  - LP: #1096137
* Revert "SAUCE: fsnotify: take groups mark_lock before mark lock"
  - LP: #1096137
* Revert "SAUCE: fsnotify: use reference counting for groups"
  - LP: #1096137
* Revert "SAUCE: fsnotify: introduce fsnotify_get_group()"
  - LP: #1096137
* fsnotify: introduce fsnotify_get_group()
  - LP: #1096137
* fsnotify: use reference counting for groups
  - LP: #1096137
* fsnotify: take groups mark_lock before mark lock
  - LP: #1096137
* fanotify: add an extra flag to mark_remove_from_mask that indicates
  wheather a mark should be destroyed
  - LP: #1096137
* fsnotify: use a mutex instead of a spinlock to protect a groups mark
  list
  - LP: #1096137
* fsnotify: pass group to fsnotify_destroy_mark()
  - LP: #1096137
* fsnotify: introduce locked versions of fsnotify_add_mark() and
  fsnotify_remove_mark()
  - LP: #1096137
* fsnotify: dont put marks on temporary list when clearing marks by group
  - LP: #1096137
* fsnotify: change locking order
  - LP: #1096137

Show diffs side-by-side

added added

removed removed

Lines of Context:
2277
2277
        } while (memcg);
2278
2278
}
2279
2279
 
 
2280
static bool zone_balanced(struct zone *zone, int order,
 
2281
                          unsigned long balance_gap, int classzone_idx)
 
2282
{
 
2283
        if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone) +
 
2284
                                    balance_gap, classzone_idx, 0))
 
2285
                return false;
 
2286
 
 
2287
        if (COMPACTION_BUILD && order && !compaction_suitable(zone, order))
 
2288
                return false;
 
2289
 
 
2290
        return true;
 
2291
}
 
2292
 
2280
2293
/*
2281
2294
 * pgdat_balanced is used when checking if a node is balanced for high-order
2282
2295
 * allocations. Only zones that meet watermarks and are in a zone allowed
2336
2349
                        continue;
2337
2350
                }
2338
2351
 
2339
 
                if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone),
2340
 
                                                        i, 0))
 
2352
                if (!zone_balanced(zone, order, 0, i))
2341
2353
                        all_zones_ok = false;
2342
2354
                else
2343
2355
                        balanced += zone->present_pages;
2446
2458
                                break;
2447
2459
                        }
2448
2460
 
2449
 
                        if (!zone_watermark_ok_safe(zone, order,
2450
 
                                        high_wmark_pages(zone), 0, 0)) {
 
2461
                        if (!zone_balanced(zone, order, 0, 0)) {
2451
2462
                                end_zone = i;
2452
2463
                                break;
2453
2464
                        } else {
2523
2534
                                testorder = 0;
2524
2535
 
2525
2536
                        if ((buffer_heads_over_limit && is_highmem_idx(i)) ||
2526
 
                                    !zone_watermark_ok_safe(zone, testorder,
2527
 
                                        high_wmark_pages(zone) + balance_gap,
2528
 
                                        end_zone, 0)) {
 
2537
                            !zone_balanced(zone, testorder,
 
2538
                                           balance_gap, end_zone)) {
2529
2539
                                shrink_zone(zone, &sc);
2530
2540
 
2531
2541
                                reclaim_state->reclaimed_slab = 0;
2552
2562
                                continue;
2553
2563
                        }
2554
2564
 
2555
 
                        if (!zone_watermark_ok_safe(zone, testorder,
2556
 
                                        high_wmark_pages(zone), end_zone, 0)) {
 
2565
                        if (!zone_balanced(zone, testorder, 0, end_zone)) {
2557
2566
                                all_zones_ok = 0;
2558
2567
                                /*
2559
2568
                                 * We are still under min water mark.  This
2835
2844
                                                &balanced_classzone_idx);
2836
2845
                }
2837
2846
        }
 
2847
 
 
2848
        current->reclaim_state = NULL;
2838
2849
        return 0;
2839
2850
}
2840
2851