ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <jlbec@evilplan.org>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl.
Date: Tue, 22 Feb 2011 00:15:31 -0800	[thread overview]
Message-ID: <20110222081530.GB30966@noexit> (raw)
In-Reply-To: <4D636D87.9050306@oracle.com>

On Tue, Feb 22, 2011 at 04:02:15PM +0800, Tristan Ye wrote:
>     Thanks for putting forward the point. I'm afraid that I'm not an 
> enough experienced
> user to talk issues on 'GFP_NOFS VS GFP_KERNEL' too much;-)
>    
>     Per my understanding, can the GFP_NOFS become a real overkill when 
> claiming around 2k memory?
> Having known that GFP_NOFS is more restrictive and more secure to 
> filesystem code for avoiding potential
> deadlock, do we really need to use GFP_KERNEL instead of GFP_NOFS there?

	In general, we should use the least restrictive mode that is
safe.  GFP_KERNEL tries the hardest to get memory, and it sleeps the
most, but it therefore gives the user the fewest ENOMEMs.

>     Btw, is there a explicit rule/convention on when to use GFP_NOFS or 
> GFP_KERNEL? e.g:

	One uses GFP_NOFS when filesystem writeback cannot be used to
free memory.  So if you're in the ocfs2 writeback code, you can't have
an allocation try to start writeback ;-)  That's why you use GFP_NOFS.
	When you are holding no locks, and blocking nothing related to
writeout, there is no reason to limit yourself.

Joel

-- 

Life's Little Instruction Book #197

	"Don't forget, a person's greatest emotional need is to 
	 feel appreciated."

			http://www.jlbec.org/
			jlbec at evilplan.org

  reply	other threads:[~2011-02-22  8:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  4:59 [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-02-22  4:59 ` [Ocfs2-devel] [PATCH 3/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEFRAG' " Tristan Ye
2011-02-22  6:09 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' " Joel Becker
2011-02-22  8:02   ` Tristan Ye
2011-02-22  8:15     ` Joel Becker [this message]
2011-02-22  8:26       ` Tristan Ye
  -- strict thread matches above, loose matches on Subject: below --
2011-05-24 10:07 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Complete rest of o2info patches(v5) Tristan Ye
2011-05-24 10:07 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-03-29  2:11 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Complete rest of o2info patches Tristan Ye
2011-03-29  2:11 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-02-18  4:26 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Adding new codes 'OCFS2_INFO_FREEINODE' and 'OCFS2_INFO_FREEFRAG' for o2info ioctl V3 Tristan Ye
2011-02-18  4:26 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-01-30  6:25 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Adding new codes 'OCFS2_INFO_FREEINODE' and 'OCFS2_INFO_FREEFRAG' for o2info ioctl V2 Tristan Ye
2011-01-30  6:26 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2011-01-31 22:57   ` Mark Fasheh
2011-02-01  7:52     ` Tristan Ye
2011-02-20 12:07   ` Joel Becker
2011-02-20 12:59     ` Tristan Ye
2011-02-21  2:04       ` Joel Becker
2011-02-21 18:17       ` Sunil Mushran
2010-11-16 10:13 [Ocfs2-devel] [PATCH 0/3] Ocfs2: Adding new codes 'OCFS2_INFO_FREEINODE' and 'OCFS2_INFO_FREEFRAG' for o2info ioctl V2 Tristan Ye
2010-11-16 10:13 ` [Ocfs2-devel] [PATCH 2/3] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2010-12-07  1:07   ` Joel Becker
2010-12-07  1:46     ` Tristan Ye

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=20110222081530.GB30966@noexit \
    --to=jlbec@evilplan.org \
    --cc=ocfs2-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).