lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0805011810410.13527@schroedinger.engr.sgi.com>
Date:	Thu, 1 May 2008 18:12:49 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Russ Anderson <rja@....com>
cc:	linux-kernel@...r.kernel.org, linux-ia64@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH 2/3] mm: Avoid putting a bad page back on the LRU v2

On Thu, 1 May 2008, Russ Anderson wrote:

> Index: linus/mm/migrate.c
> ===================================================================
> --- linus.orig/mm/migrate.c	2008-05-01 19:05:33.000000000 -0500
> +++ linus/mm/migrate.c	2008-05-01 19:06:15.000000000 -0500
> @@ -380,6 +380,7 @@ static void migrate_page_copy(struct pag
>  		SetPageChecked(newpage);
>  	if (PageMappedToDisk(page))
>  		SetPageMappedToDisk(newpage);
> +	/* Do not migrate PG_memerror to the new page */

Why is the comment here?

  
>  	if (PageDirty(page)) {
>  		clear_page_dirty_for_io(page);
> @@ -721,6 +722,8 @@ unlock:
>   		 */
>   		list_del(&page->lru);
>   		move_to_lru(page);
> +		if (PageMemError(page))
> +			totalbad_pages++;

Wouldnt this be taken care of by the lru handling?

> +#ifdef CONFIG_PAGEFLAGS_EXTENDED
> +PAGEFLAG(MemError, memerror)
> +#else
> +#define PageMemError(page)	0

Use

PAGEFLAG_FLAGS(MemError)

>  #include <linux/page-flags.h>
>  
> -#define PAGE_FLAGS	(1 << PG_lru   | 1 << PG_private   | 1 << PG_locked | \
> +#define PAGE_FLAGS_BASE	(1 << PG_lru   | 1 << PG_private   | 1 << PG_locked | \
>  			 1 << PG_buddy | 1 << PG_writeback | \
>  			 1 << PG_slab  | 1 << PG_swapcache | 1 << PG_active)
> +
> +#ifdef CONFIG_PAGEFLAGS_EXTENDED
> +#define	PAGE_FLAGS	(PAGE_FLAGS_BASE | 1UL << PG_memerror)
> +#else
> +#define	PAGE_FLAGS	(PAGE_FLAGS_BASE)
> +#endif
>  
>  #define PAGE_FLAGS_RECLAIM      (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty)
>  #define PAGE_FLAGS_RESERVE	(PAGE_FLAGS | 1 << PG_reserved)

The groups of page flags could also be put into page-flags.h.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ