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: <op.v79a47ve3l0zgt@mpn-glaptop>
Date:	Wed, 18 Jan 2012 02:44:57 +0100
From:	"Michal Nazarewicz" <mina86@...a86.com>
To:	"sandeep patil" <psandeep.s@...il.com>
Cc:	"Marek Szyprowski" <m.szyprowski@...sung.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-media@...r.kernel.org, linux-mm@...ck.org,
	linaro-mm-sig@...ts.linaro.org,
	"Daniel Walker" <dwalker@...eaurora.org>,
	"Russell King" <linux@....linux.org.uk>,
	"Arnd Bergmann" <arnd@...db.de>,
	"Jonathan Corbet" <corbet@....net>, "Mel Gorman" <mel@....ul.ie>,
	"Dave Hansen" <dave@...ux.vnet.ibm.com>,
	"Jesse Barker" <jesse.barker@...aro.org>,
	"Kyungmin Park" <kyungmin.park@...sung.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [Linaro-mm-sig] [PATCH 04/11] mm: page_alloc: introduce
 alloc_contig_range()

>> My understanding of that situation is that the page is on pcp list in which
>> cases it's page_private is not updated.  Draining and the first patch in
>> the series (and also the commit I've pointed to above) are designed to fix
>> that but I'm unsure why they don't work all the time.

On Wed, 18 Jan 2012 01:46:37 +0100, sandeep patil <psandeep.s@...il.com> wrote:
> Will verify this if the page is found on the pcp list as well .

I was wondering in general if “!PageBuddy(page) && !page_count(page)” means
page is on PCP.  From what I've seen in page_isolate.c it seems to be the case.

>>> I've also had a test case where it failed because (page_count() != 0)

> With this, when it failed the page_count() returned a value of 2.  I am not
> sure why, but I will try and see If I can reproduce this.

If I'm not mistaken, page_count() != 0 means the page is allocated.  I can see
the following scenarios which can lead to page being allocated in when
test_pages_isolated() is called:

1. The page failed to migrate.  In this case however, the code would abort earlier.

2. The page was migrated but then allocated.  This is not possible since
    migrated pages are freed which puts the page on MIGRATE_ISOLATE freelist which
    guarantees that the page will not be migrated.

3. The page was removed from PCP list but with migratetype == MIGRATE_CMA.  This
    is something the first patch in the series as well as the commit I've mentioned tries
    to address so hopefully it won't be an issue any more.

4. The page was allocated from PCP list.  This may happen because draining of PCP
    list happens after IRQs are enabled in set_migratetype_isolate().  I don't have
    a solution for that just yet.  One is to alter update_pcp_isolate_block() to
    remove page from the PCP list.  I haven't looked at specifics of how to implement
    this just yet.

>> Moving the check outside of __alloc_contig_migrate_range() after outer_start
>> is calculated in alloc_contig_range() could help.
>
> I was going to suggest that, moving the check until after outer_start
> is calculated will definitely help IMO. I am sure I've seen a case where
>
>   page_count(page) = page->private = 0 and PageBuddy(page) was false.

Yep, I've pushed new content to my branch (git://github.com/mina86/linux-2.6.git cma)
and will try to get Marek to test it some time soon (I'm currently swamped with
non-Linux related work myself).

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@...gle.com>--------------ooO--(_)--Ooo--
--
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