lkml.org 
[lkml]   [2012]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/3] mm: introduce compaction and migration for virtio ballooned pages
On 08/06/2012 03:00 PM, Rafael Aquini wrote:
> On Mon, Aug 06, 2012 at 02:38:23PM -0400, Rik van Riel wrote:
>> On 08/06/2012 09:56 AM, Rafael Aquini wrote:
>>
>>> @@ -846,6 +861,21 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
>>> goto out;
>>>
>>> rc = __unmap_and_move(page, newpage, force, offlining, mode);
>>> +
>>> + if (unlikely(is_balloon_page(newpage)&&
>>> + balloon_compaction_enabled())) {
>>
>> Could that be collapsed into one movable_balloon_page(newpage) function
>> call?
>>
> Keeping is_balloon_page() as is, and itroducing this new movable_balloon_page()
> function call, or just doing a plain rename, as Andrew has first suggested?

Just a plain rename would work.

> +static inline bool is_balloon_page(struct page *page)
> +{
> + return (page->mapping && page->mapping == balloon_mapping);
> +}

As an aside, since you are only comparing page->mapping and
not dereferencing it, it can be simplified to just:

return (page->mapping == balloon_mapping);



--
All rights reversed


\
 
 \ /
  Last update: 2012-08-06 21:42    [W:0.076 / U:2.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site