All of lore.kernel.org
 help / color / mirror / Atom feed
* Query - Related to kernel changes for GFP_NOIO flag
@ 2017-03-05  9:07 Suraj Choudhari
  2017-03-05  9:10 ` Fwd: " Suraj Choudhari
  0 siblings, 1 reply; 2+ messages in thread
From: Suraj Choudhari @ 2017-03-05  9:07 UTC (permalink / raw)
  To: linux-newbie

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Fwd: Query - Related to kernel changes for GFP_NOIO flag
  2017-03-05  9:07 Query - Related to kernel changes for GFP_NOIO flag Suraj Choudhari
@ 2017-03-05  9:10 ` Suraj Choudhari
  0 siblings, 0 replies; 2+ messages in thread
From: Suraj Choudhari @ 2017-03-05  9:10 UTC (permalink / raw)
  To: linux-kernel

Hi,

GFP_NOIO flag used for kmalloc is currently defined as -  '__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 while 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-05  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-05  9:07 Query - Related to kernel changes for GFP_NOIO flag Suraj Choudhari
2017-03-05  9:10 ` Fwd: " Suraj Choudhari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.