[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <HK0P153MB0273F49C7C59012A6BE0B304BFD90@HK0P153MB0273.APCP153.PROD.OUTLOOK.COM>
Date: Fri, 17 Apr 2020 22:44:39 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Wei Liu <wei.liu@...nel.org>
CC: "bp@...en8.de" <bp@...en8.de>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"hpa@...or.com" <hpa@...or.com>, KY Srinivasan <kys@...rosoft.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"x86@...nel.org" <x86@...nel.org>,
Michael Kelley <mikelley@...rosoft.com>,
vkuznets <vkuznets@...hat.com>
Subject: RE: [PATCH] x86/hyperv: Suspend/resume the VP assist page for
hibernation
> From: Wei Liu <wei.liu@...nel.org>
> Sent: Friday, April 17, 2020 2:08 AM
> > @@ -72,7 +72,8 @@ static int hv_cpu_init(unsigned int cpu)
> > struct page *pg;
> >
> > input_arg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);
> > - pg = alloc_page(GFP_KERNEL);
> > + /* hv_cpu_init() can be called with IRQs disabled from hv_resume() */
> > + pg = alloc_page(GFP_ATOMIC);
>
> IMHO it would be better to only tap into the reserve pool if so
> required, e.g.
>
> pg = alloc_page(irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
>
> Wei.
Ok, I'll follow the suggestion.
BTW, there are indeed some usages like this, but not a lot:
grep irqs_disabled drivers/acpi include/acpi drivers/trace -nr |grep GFP_ATOMIC | grep GFP_KERNEL
Thanks,
-- Dexuan
Powered by blists - more mailing lists