|
|
|
Re: [PATCH][mmotm] don't attempt to reclaim anon page in lumpy reclaim when no swap space is available | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
2009/7/4 Minchan Kim <minchan.kim@xxxxxxxxx>:
>
> This patch is based on mmotm 2009-07-02-19-57 reverted
> 'vmscan: don't attempt to reclaim anon page in lumpy reclaim when no swap space is available.'
>
> This verssion is better than old one.
> That's because enough swap space check is done in case of only lumpy reclaim.
> so it can't degrade performance in normal case.
>
> == CUT HERE ==
>
> VM already avoids attempting to reclaim anon pages in various places, But
> it doesn't avoid it for lumpy reclaim.
>
> It shuffles lru list unnecessary so that it is pointless.
>
> Signed-off-by: Minchan Kim <minchan.kim@xxxxxxxxx>
> Cc: Mel Gorman <mel@xxxxxxxxx>
> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxx>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> ---
> mm/vmscan.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 27558aa..977af15 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -930,6 +930,13 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
> /* Check that we have not crossed a zone boundary. */
> if (unlikely(page_zone_id(cursor_page) != zone_id))
> continue;
> + /*
> + * If we don't have enough swap space, reclaiming of anon page
> + * which don't already have a swap slot is pointless.
> + */
> + if (nr_swap_pages <= 0 && (PageAnon(cursor_page) &&
> + !PageSwapCache(cursor_page)))
> + continue;
> if (__isolate_lru_page(cursor_page, mode, file) == 0) {
> list_move(&cursor_page->lru, dst);
> mem_cgroup_del_lru(cursor_page);
okey. this is definitely better. thanks.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Site Home] [Other Archives] [Linux Kernel Newbies] [Linux Driver Development] [Fedora Kernel] [Linux Kernel Testers] [Linux SH] [Linux Omap] [Linux Kbuild] [Linux Tape] [Linux Input] [Linux Kernel Janitors] [Linux Kernel Packagers] [Linux Doc] [Linux Man Pages] [Linux API] [Linux Modules] [Linux Standards] [Kernel Announce] [Memory] [Netdev] [Git] [Linux PCI] [Linux I2C] [Linux RDMA] [Linux NUMA] [Netfilter] [Netfilter Devel] [SELinux] [Bugtraq] [FIO] [Linux Serial] [Linux PPP] [Linux ISDN] [Linux Next] [Kernel Stable Commits] [Linux Tip Commits] [Kernel MM Commits] [Linux Security Module] [Ext3] [Ext4] [Linux BTRFS] [Linux XFS] [Linux NFS] [Linux Cachefs] [Reiser FS] [Initramfs] [Fastboot] [Linux RT Users] [Linux Virtualization] [LVS Devel] [Hot Plug] [KVM] [KVM PPC] [KVM ia64] [Linux Containers] [Util Linux NG] [Sk Drivers] [Wireless] [Linux Bluetooth] [Bluez Devel] [Ethernet Bridging] [LM Sensors] [Embedded Linux] [Linux MMC] [Sparse] [Linux Arch] [Linux ACPI] [Linux IBM ACPI] [Linux OpenGL] [CPU Freq] [Linux Power Management] [Linux DCCP] [Linux SCTP] [ALSA Devel] [Linux USB] [Large Format Photos] [DVD Store] [Tux] [Gimp] [Yosemite National Park Forum] [Linux PA RISC] [MIPS Linux] [IBM S/390 Linux] [ARM Linux] [ARM Kernel] [Sparc Linux] [Linux Security] [Linux Sound] [Linux Media] [Video 4 Linux] [Linux IRDA Users] [Linux for the blind] [Linux RAID] [Linux ATA RAID] [Device Mapper] [Linux Clusters] [Linux SCSI] [Linux SCSI Target Infrastructure] [Linux IDE] [Linux SMP] [Linux AXP] [Linux Alpha] [Linux M68K] [Linux ia64] [Linux 8086] [Linux x86_64] [Linux Config] [Linux Apps] [Linux MSDOS] [Linux X.25] [Linux Crypto] [DM Crypt] [Linux Btrace] [Utrace Devel] [Yosemite Photos] [Linux C Programming] [Linux Assembly] [Dash] [DWARVES] [Hail Devel] [Older Kernel Mail]
![]() |
![]() |