lkml.org 
[lkml]   [2009]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] [10/16] HWPOISON: Handle poisoned pages in set_page_dirty()
    On Thu, Jun 04, 2009 at 02:46:43AM +0800, Andi Kleen wrote:
    >
    > Bail out early in set_page_dirty for poisoned pages. We don't want any
    > of the dirty accounting done or file system write back started, because
    > the page will be just thrown away.

    I'm afraid this patch is not necessary and could be harmful.

    It is not necessary because a poisoned page will normally already be
    isolated from page cache, or likely cannot be isolated because it has
    dirty buffers.

    It is harmful because it put the page into dirty state without queuing
    it for IO by moving it to s_io. When more normal pages are dirtied
    later, __set_page_dirty_nobuffers() won't move the inode into s_io,
    hence delaying the writeback of good pages for arbitrary long time.

    Thanks,
    Fengguang

    > ---
    > mm/page-writeback.c | 4 ++++
    > 1 file changed, 4 insertions(+)
    >
    > Index: linux/mm/page-writeback.c
    > ===================================================================
    > --- linux.orig/mm/page-writeback.c 2009-06-03 19:36:20.000000000 +0200
    > +++ linux/mm/page-writeback.c 2009-06-03 19:36:23.000000000 +0200
    > @@ -1304,6 +1304,10 @@
    > {
    > struct address_space *mapping = page_mapping(page);
    >
    > + if (unlikely(PageHWPoison(page))) {
    > + SetPageDirty(page);
    > + return 0;
    > + }
    > if (likely(mapping)) {
    > int (*spd)(struct page *) = mapping->a_ops->set_page_dirty;
    > #ifdef CONFIG_BLOCK


    \
     
     \ /
      Last update: 2009-06-04 02:39    [W:0.022 / U:0.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site