linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suraj Choudhari <surajschoudhari@gmail.com>
To: linux-newbie@vger.kernel.org
Subject: Query - Related to kernel changes for GFP_NOIO flag
Date: Sun, 5 Mar 2017 14:37:17 +0530	[thread overview]
Message-ID: <CAGvB2rP=C6AdDw=43pRhS85wbrxcpXE6cypXc=hSdQfJx=q-Fg@mail.gmail.com> (raw)

Hi,

The GFP_NOIO flag used for kmalloc is currently defined to be '__GFP_RECLAIM'

#define GFP_NOIO        (__GFP_RECLAIM)

#define __GFP_RECLAIM ((__force
gfp_t)(___GFP_DIRECT_RECLAIM|___GFP_KSWAPD_RECLAIM


However, prior to 4.4 kernel, this flag was defined as __GFP_WAIT.
#define GFP_NOIO        (__GFP_WAIT)


Queries -
======
1]  Can any physical disk IO happen due to memory allocation done
using 'GFP_NOIO' ?

      The reason to ask is since the GFP_NOIO is now modified to use
__GFP_KSWAPD_RECLAIM,  so I am thinking that physical disk IO may
probably happen whiel swapping the stale pages to disk in kswapd.

2] If kernel code wants to use kmalloc() and wants to ensure there is
NO any physical/disk IO due to kmalloc,  shall the kernel code use
__GFP_DIRECT_RECLAIM instead of GFP_NOIO ?


Thanks,
Suraj
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

                 reply	other threads:[~2017-03-05  9:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAGvB2rP=C6AdDw=43pRhS85wbrxcpXE6cypXc=hSdQfJx=q-Fg@mail.gmail.com' \
    --to=surajschoudhari@gmail.com \
    --cc=linux-newbie@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 read-only IMAP folder(s) and NNTP newsgroup(s).