linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH 3/3] alloc contig pages with migration.
Date: Mon, 18 Oct 2010 14:52:17 +0900	[thread overview]
Message-ID: <20101018145217.38ba8ffc.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <AANLkTimpVWwH=znGkG8zEPBcYxq-+UR+7mN29f-RK7d=@mail.gmail.com>

On Mon, 18 Oct 2010 14:52:19 +0900
Minchan Kim <minchan.kim@gmail.com> wrote:

> On Mon, Oct 18, 2010 at 2:31 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > On Mon, 18 Oct 2010 14:18:52 +0900
> > Minchan Kim <minchan.kim@gmail.com> wrote:
> >> >
> >> >> > + *
> >> >> > + * Search an area of @size in the physical memory map and checks wheter
> >> >>
> >> >> Typo
> >> >> whether
> >> >>
> >> >> > + * we can create a contigous free space. If it seems possible, try to
> >> >> > + * create contigous space with page migration. If no_search==true, we just try
> >> >> > + * to allocate [hint, hint+size) range of pages as contigous block.
> >> >> > + *
> >> >> > + * Returns a page of the beginning of contiguous block. At failure, NULL
> >> >> > + * is returned. Each page in the area is set to page_count() = 1. Because
> >> >>
> >> >> Why do you mention page_count() = 1?
> >> >> Do users of this function have to know it?
> >> >
> >> > A user can free any page within the range for his purpose.
> >>
> >> I think it's not a good idea if we allow handling of page by page, not
> >> for page-chunk requested by user.
> >> By mistake, free_contig_pages could have a trouble to free pages.
> >> Why do you support the feature? A Do you have any motivation?
> >>
> > No big motivation.
> >
> > Usual pages are set up by prep_compund_page(page, order), but it is pages smaller
> > than MAX_ORDER. A Then, I called prep_new_page() one by one.
> > And I don't think some new prep_xxxx_page() is required.
> >
> > If you requests, ok, I'll add one.
> 
> Maybe we are talking another thing.
> 
> My question is why you noticed "page_count() == 1" in function description.
> So your answer was for user to free some pages within big contiguous page.
> Then, my concern is that if you didn't mentioned page_count() == 1 in
> description, anonymous user will use just alloc_contig_pages and
> free_contig_pages. That's enough for current our requirement. But
> since you mentioned page_count() == 1 and you want for user to free
> some pages within big contiguous page, anonymous user who isn't expert
> in mm or careless people can free pages _freely_. It could make BUG
> easily(free_contig_pages can free the page which is freed by user's
> put_page).
> 
> So if there isn't strong cause, I hope removing the mention for
> preventing careless API usage.
> 

Ah, ok. I see. I'll update that parts as "use free_contig_page() to free a chunk".

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-10-18  5:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  3:15 [RFC][PATCH 1/3] contigous big page allocator KAMEZAWA Hiroyuki
2010-10-13  3:17 ` [RFC][PATCH 2/3] find a contiguous range KAMEZAWA Hiroyuki
2010-10-17  3:18   ` Minchan Kim
2010-10-18  0:29     ` KAMEZAWA Hiroyuki
2010-10-13  3:18 ` [RFC][PATCH 3/3] alloc contig pages with migration KAMEZAWA Hiroyuki
2010-10-17  4:05   ` Minchan Kim
2010-10-18  0:35     ` KAMEZAWA Hiroyuki
2010-10-18  5:18       ` Minchan Kim
2010-10-18  5:31         ` KAMEZAWA Hiroyuki
2010-10-18  5:52           ` Minchan Kim
2010-10-18  5:52             ` KAMEZAWA Hiroyuki [this message]
2010-10-13  5:05 ` [RFC][PATCH 1/3] contigous big page allocator KOSAKI Motohiro
2010-10-13  7:01 ` Andi Kleen
2010-10-13  7:12   ` KAMEZAWA Hiroyuki
2010-10-13  8:36     ` Andi Kleen
2010-10-13  8:39       ` KAMEZAWA Hiroyuki
2010-10-14  1:59       ` KOSAKI Motohiro
2010-10-14  7:07   ` FUJITA Tomonori
2010-10-14  7:24     ` Andi Kleen
2010-10-14  8:36       ` FUJITA Tomonori
2010-10-14 12:55         ` Andi Kleen
2010-10-14 15:09           ` FUJITA Tomonori
2010-10-14 12:10       ` Felipe Contreras
2010-10-14 12:09     ` Felipe Contreras
2010-10-14 15:24       ` FUJITA Tomonori
2010-10-14 21:50         ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101018145217.38ba8ffc.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox