RE: [PATCH] x86/hyperv: Suspend/resume the VP assist page for hibernation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Wei Liu <wei.liu@xxxxxxxxxx>
> 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux