From: Sasha Levin <sasha.levin@oracle.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 3/3] f2fs: refactor flush_nat_entries to remove costly reorganizing ops
Date: Sat, 11 Oct 2014 09:11:21 -0400 [thread overview]
Message-ID: <54392C79.4010607@oracle.com> (raw)
In-Reply-To: <1411447990-37919-3-git-send-email-jaegeuk@kernel.org>
On 09/23/2014 12:53 AM, Jaegeuk Kim wrote:
> +static void __set_nat_cache_dirty(struct f2fs_nm_info *nm_i,
> + struct nat_entry *ne)
> +{
> + nid_t set = ne->ni.nid / NAT_ENTRY_PER_BLOCK;
> + struct nat_entry_set *head;
> +
> + if (get_nat_flag(ne, IS_DIRTY))
> + return;
> +retry:
> + head = radix_tree_lookup(&nm_i->nat_set_root, set);
> + if (!head) {
> + head = f2fs_kmem_cache_alloc(nat_entry_set_slab, GFP_ATOMIC);
This is funny, you call f2fs_kmem_cache_alloc() here with GFP_ATOMIC because
of disabled preemption, but f2fs_kmem_cache_alloc() will attempt to
cond_resched() in case of failed allocations:
retry:
entry = kmem_cache_alloc(cachep, flags);
if (!entry) {
cond_resched();
goto retry;
}
So in reality, f2fs_kmem_cache_alloc can't really work with GFP_ATOMIC,
and right now there are two different locations that call it with that
flag.
Thanks,
Sasha
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
next prev parent reply other threads:[~2014-10-11 13:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 4:53 [PATCH 1/3] f2fs: introduce cp_control structure Jaegeuk Kim
2014-09-23 4:53 ` [PATCH 2/3] f2fs: introduce FITRIM in f2fs_ioctl Jaegeuk Kim
2014-09-30 6:01 ` Chao Yu
2014-10-01 15:07 ` Jaegeuk Kim
2014-09-23 4:53 ` [PATCH 3/3] f2fs: refactor flush_nat_entries to remove costly reorganizing ops Jaegeuk Kim
2014-09-30 6:04 ` [f2fs-dev] " Chao Yu
2014-10-01 15:06 ` Jaegeuk Kim
2014-10-11 13:11 ` Sasha Levin [this message]
2014-09-30 6:01 ` [PATCH 1/3] f2fs: introduce cp_control structure Chao Yu
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=54392C79.4010607@oracle.com \
--to=sasha.levin@oracle.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).