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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090630010856.GE21254@sli10-desk.sh.intel.com>
Date:	Tue, 30 Jun 2009 09:08:56 +0800
From:	Shaohua Li <shaohua.li@...el.com>
To:	Christoph Lameter <cl@...ux-foundation.org>
Cc:	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	"mel@....ul.ie" <mel@....ul.ie>,
	"Zhao, Yakui" <yakui.zhao@...el.com>
Subject: Re: + memory-hotplug-migrate-swap-cache-page.patch added to -mm
	tree

Sorry, last mail sent to wrong list.

On Tue, Jun 30, 2009 at 06:13:54AM +0800, Christoph Lameter wrote:
> When does this occur? From user space you are typically not able to get to
> pages that are not mapped into your address space.
migrate.c has comments about this. swap readahead will make this happen too.

Thanks,
Shaohua
> >
> > The patch titled
> >      memory hotplug: migrate swap cache page
> > has been added to the -mm tree.  Its filename is
> >      memory-hotplug-migrate-swap-cache-page.patch
> >
> > Before you just go and hit "reply", please:
> >    a) Consider who else should be cc'ed
> >    b) Prefer to cc a suitable mailing list as well
> >    c) Ideally: find the original patch on the mailing list and do a
> >       reply-to-all to that, adding suitable additional cc's
> >
> > *** Remember to use Documentation/SubmitChecklist when testing your code ***
> >
> > See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
> > out what to do about this
> >
> > The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
> >
> > ------------------------------------------------------
> > Subject: memory hotplug: migrate swap cache page
> > From: Shaohua Li <shaohua.li@...el.com>
> >
> > In test, some pages in swap-cache can't be migrated, as they aren't rmap.
> >
> > unmap_and_move() ignores swap-cache page which is just read in and hasn't
> > rmap (see the comments in the code), but swap_aops provides .migratepage.
> > Better to migrate such pages instead of ignore them.
> >
> > Signed-off-by: Shaohua Li <shaohua.li@...el.com>
> > Cc: Mel Gorman <mel@....ul.ie>
> > Cc: Christoph Lameter <cl@...ux-foundation.org>
> > Cc: Yakui Zhao <yakui.zhao@...el.com>
> > Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> > ---
> >
> >  mm/migrate.c |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff -puN mm/migrate.c~memory-hotplug-migrate-swap-cache-page mm/migrate.c
> > --- a/mm/migrate.c~memory-hotplug-migrate-swap-cache-page
> > +++ a/mm/migrate.c
> > @@ -147,7 +147,7 @@ out:
> >  static void remove_file_migration_ptes(struct page *old, struct page *new)
> >  {
> >  	struct vm_area_struct *vma;
> > -	struct address_space *mapping = page_mapping(new);
> > +	struct address_space *mapping = new->mapping;
> >  	struct prio_tree_iter iter;
> >  	pgoff_t pgoff = new->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
> >
> > @@ -664,13 +664,15 @@ static int unmap_and_move(new_page_t get
> >  			 *    needs to be effective.
> >  			 */
> >  			try_to_free_buffers(page);
> > +			goto rcu_unlock;
> >  		}
> > -		goto rcu_unlock;
> > +		goto skip_unmap;
> >  	}
> >
> >  	/* Establish migration ptes or remove ptes */
> >  	try_to_unmap(page, 1);
> >
> > +skip_unmap:
> >  	if (!page_mapped(page))
> >  		rc = move_to_new_page(newpage, page);
> >
> > _
> >
> > Patches currently in -mm which might be from shaohua.li@...el.com are
> >
> > linux-next.patch
> > memory-hotplug-update-zone-pcp-at-memory-online.patch
> > memory-hotplug-exclude-isolated-page-from-pco-page-alloc.patch
> > memory-hotplug-make-pages-from-movable-zone-always-isolatable.patch
> > memory-hotplug-alloc-page-from-other-node-in-memory-online.patch
> > memory-hotplug-migrate-swap-cache-page.patch
> >
> >
--
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