From: Mike Kravetz <mike.kravetz@oracle.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: dvyukov@google.com, mhocko@suse.com, hillf.zj@alibaba-inc.com,
dave.hansen@linux.intel.com, akpm@linux-foundation.org
Subject: Re: [PATCH] hugetlbfs: initialize shared policy as part of inode allocation
Date: Sat, 25 Mar 2017 14:35:53 -0700 [thread overview]
Message-ID: <16be9b63-5325-771f-25dd-7fd9e0c67866@oracle.com> (raw)
In-Reply-To: <201703250954.ICG12429.FHOMFLJOSOtFQV@I-love.SAKURA.ne.jp>
On 03/24/2017 05:54 PM, Tetsuo Handa wrote:
> Mike Kravetz wrote:
>> Any time after inode allocation, destroy_inode can be called. The
>> hugetlbfs inode contains a shared_policy structure, and
>> mpol_free_shared_policy is unconditionally called as part of
>> hugetlbfs_destroy_inode. Initialize the policy as part of inode
>> allocation so that any quick (error path) calls to destroy_inode
>> will be handed an initialized policy.
>
> I think you can as well do
>
> - struct hugetlbfs_inode_info *info;
> - info = HUGETLBFS_I(inode);
> - mpol_shared_policy_init(&info->policy, NULL);
>
> in hugetlbfs_get_root().
Thank you. You are correct.
After doing shared policy initialization at inode allocation time,
it is redundant here.
I will send v2 patch with this modification.
--
Mike Kravetz
--
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>
prev parent reply other threads:[~2017-03-25 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 23:11 Mike Kravetz
2017-03-25 0:54 ` Tetsuo Handa
2017-03-25 21:35 ` Mike Kravetz [this message]
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=16be9b63-5325-771f-25dd-7fd9e0c67866@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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