linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: kill page_queue_congested()
@ 2008-12-17 11:27 KOSAKI Motohiro
  2008-12-17 11:39 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: KOSAKI Motohiro @ 2008-12-17 11:27 UTC (permalink / raw)
  To: LKML, linux-mm, Andrew Morton; +Cc: kosaki.motohiro


==
Subject: [PATCH] mm: kill page_queue_congested()

page_queue_congested() was introduced at 2002.
but it is unused until now at all.

it can be removed.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 mm/swapfile.c |   20 --------------------
 1 file changed, 20 deletions(-)

Index: b/mm/swapfile.c
===================================================================
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1203,26 +1203,6 @@ out:
 	return ret;
 }
 
-#if 0	/* We don't need this yet */
-#include <linux/backing-dev.h>
-int page_queue_congested(struct page *page)
-{
-	struct backing_dev_info *bdi;
-
-	BUG_ON(!PageLocked(page));	/* It pins the swap_info_struct */
-
-	if (PageSwapCache(page)) {
-		swp_entry_t entry = { .val = page_private(page) };
-		struct swap_info_struct *sis;
-
-		sis = get_swap_info_struct(swp_type(entry));
-		bdi = sis->bdev->bd_inode->i_mapping->backing_dev_info;
-	} else
-		bdi = page->mapping->backing_dev_info;
-	return bdi_write_congested(bdi);
-}
-#endif
-
 asmlinkage long sys_swapoff(const char __user * specialfile)
 {
 	struct swap_info_struct * p = NULL;


--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: kill page_queue_congested()
  2008-12-17 11:27 [PATCH] mm: kill page_queue_congested() KOSAKI Motohiro
@ 2008-12-17 11:39 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2008-12-17 11:39 UTC (permalink / raw)
  To: KOSAKI Motohiro; +Cc: LKML, linux-mm, Andrew Morton

On Wed, 2008-12-17 at 20:27 +0900, KOSAKI Motohiro wrote:
> ==
> Subject: [PATCH] mm: kill page_queue_congested()
> 
> page_queue_congested() was introduced at 2002.
> but it is unused until now at all.
> 
> it can be removed.

Or we can hook it up in vmscan, and skip congested pages on high scan
order or something..

> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> ---
>  mm/swapfile.c |   20 --------------------
>  1 file changed, 20 deletions(-)
> 
> Index: b/mm/swapfile.c
> ===================================================================
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -1203,26 +1203,6 @@ out:
>  	return ret;
>  }
>  
> -#if 0	/* We don't need this yet */
> -#include <linux/backing-dev.h>
> -int page_queue_congested(struct page *page)
> -{
> -	struct backing_dev_info *bdi;
> -
> -	BUG_ON(!PageLocked(page));	/* It pins the swap_info_struct */
> -
> -	if (PageSwapCache(page)) {
> -		swp_entry_t entry = { .val = page_private(page) };
> -		struct swap_info_struct *sis;
> -
> -		sis = get_swap_info_struct(swp_type(entry));
> -		bdi = sis->bdev->bd_inode->i_mapping->backing_dev_info;
> -	} else
> -		bdi = page->mapping->backing_dev_info;
> -	return bdi_write_congested(bdi);
> -}
> -#endif
> -
>  asmlinkage long sys_swapoff(const char __user * specialfile)
>  {
>  	struct swap_info_struct * p = NULL;
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-17 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-17 11:27 [PATCH] mm: kill page_queue_congested() KOSAKI Motohiro
2008-12-17 11:39 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox