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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111123091933.GL19415@suse.de>
Date:	Wed, 23 Nov 2011 09:19:33 +0000
From:	Mel Gorman <mgorman@...e.de>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	Linux-MM <linux-mm@...ck.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Jan Kara <jack@...e.cz>, Andy Isaacson <adi@...apodia.org>,
	Johannes Weiner <jweiner@...hat.com>,
	Rik van Riel <riel@...hat.com>, Nai Xia <nai.xia@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/7] mm: compaction: make isolate_lru_page() filter-aware
 again

On Wed, Nov 23, 2011 at 02:30:18AM +0900, Minchan Kim wrote:
> > <SNIP>
> > +	/*
> > +	 * To minimise LRU disruption, the caller can indicate that it only
> > +	 * wants to isolate pages it will be able to operate on without
> > +	 * blocking - clean pages for the most part.
> > +	 *
> > +	 * ISOLATE_CLEAN means that only clean pages should be isolated. This
> > +	 * is used by reclaim when it is cannot write to backing storage
> > +	 *
> > +	 * ISOLATE_ASYNC_MIGRATE is used to indicate that it only wants to pages
> > +	 * that it is possible to migrate without blocking with a ->migratepage
> > +	 * handler
> > +	 */
> > +	if (mode & (ISOLATE_CLEAN|ISOLATE_ASYNC_MIGRATE)) {
> > +		/* All the caller can do on PageWriteback is block */
> > +		if (PageWriteback(page))
> > +			return ret;
> > +
> > +		if (PageDirty(page)) {
> > +			struct address_space *mapping;
> > +
> > +			/* ISOLATE_CLEAN means only clean pages */
> > +			if (mode & ISOLATE_CLEAN)
> > +				return ret;
> > +
> > +			/*
> > +			 * Only the ->migratepage callback knows if a dirty
> > +			 * page can be migrated without blocking. Skip the
> > +			 * page unless there is a ->migratepage callback.
> > +			 */
> > +			mapping = page_mapping(page);
> > +			if (!mapping || !mapping->a_ops->migratepage)
> 
> I didn't review 4/7 carefully yet.

Thanks for reviewing the others.

> In case of page_mapping is NULL, move_to_new_page calls migrate_page
> which is non-blocking function. So, I guess it could be migrated without blocking.
>  

Well spotted

                        /*
                         * Only pages without mappings or that have a
                         * ->migratepage callback are possible to
                         * migrate without blocking
                         */
                        mapping = page_mapping(page);
                        if (mapping && !mapping->a_ops->migratepage)
                                return ret;

-- 
Mel Gorman
SUSE Labs
--
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