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: <CAPQyPG58cjEQ8jPFhxGB6URcFoNt=NBC1L+T8aEWVUtPfBNh-Q@mail.gmail.com>
Date:	Wed, 23 Nov 2011 23:23:19 +0800
From:	Nai Xia <nai.xia@...il.com>
To:	Mel Gorman <mgorman@...e.de>
Cc:	Shaohua Li <shaohua.li@...el.com>, Linux-MM <linux-mm@...ck.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Minchan Kim <minchan.kim@...il.com>, Jan Kara <jack@...e.cz>,
	Andy Isaacson <adi@...apodia.org>,
	Johannes Weiner <jweiner@...hat.com>,
	Rik van Riel <riel@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/7] mm: compaction: Introduce sync-light migration for
 use by compaction

On Wed, Nov 23, 2011 at 11:08 PM, Mel Gorman <mgorman@...e.de> wrote:
> On Wed, Nov 23, 2011 at 10:35:37PM +0800, Nai Xia wrote:
>> On Wed, Nov 23, 2011 at 9:45 PM, Mel Gorman <mgorman@...e.de> wrote:
>> > On Wed, Nov 23, 2011 at 09:05:08PM +0800, Nai Xia wrote:
>> >> > <SNIP>
>> >> >
>> >> > Where are you adding this check?
>> >> >
>> >> > If you mean in __unmap_and_move(), the check is unnecessary unless
>> >> > another subsystem starts using sync-light compaction. With this series,
>> >> > only direct compaction cares about MIGRATE_SYNC_LIGHT. If the page is
>> >>
>> >> But I am still a little bit confused that if MIGRATE_SYNC_LIGHT is only
>> >> used by direct compaction and  another mode can be used by it:
>> >> MIGRATE_ASYNC also does not write dirty pages, then why not also
>> >> do an (current->flags & PF_MEMALLOC) test before writing out pages,
>> >
>> > Why would it be necessary?
>> > Why would it be better than what is there now?
>>
>> I mean, if
>>    MIGRATE_SYNC_LIGHT --> (current->flags & PF_MEMALLOC) and
>>    MIGRATE_SYNC_LIGHT --> no dirty writeback, and (current->flags & PF_MEMALLOC)
>>                       --> (MIGRATE_SYNC_LIGHT || MIGRATE_ASYNC)
>>    MIGRATE_ASYNC      --> no dirty writeback, then
>> why not simply  (current->flags & PF_MEMALLOC) ---> no dirty writeback
>> and keep the sync meaning as it was?
>>
>
> Ok, I see what you mean. Instead of making MIGRATE_SYNC_LIGHT part of
> the API, we could instead special case within migrate.c how to behave if
> MIGRATE_SYNC && PF_MEMALLOC.

Yeah~

>
> This would be functionally equivalent and satisfy THP users
> but I do not see it as being easier to understand or easier
> to maintain than updating the API. If someone in the future
> wanted to use migration without significant stalls without
> being PF_MEMALLOC, they would need to update the API like this.
> There are no users like this today but automatic NUMA migration
> might want to leverage something like MIGRATE_SYNC_LIGHT
> (http://comments.gmane.org/gmane.linux.kernel.mm/70239)

I see.
So could I say that might be the time and users for my suggestion of
page uptodate check to fit into?



Thanks,

Nai
>
> --
> 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