Re: [PATCH v3 1/3] mm/memory-failure: userspace controls soft-offlining pages

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

 



On Tue, Jun 18, 2024 at 10:13 PM Oscar Salvador <osalvador@xxxxxxx> wrote:
>
> On Wed, Jun 19, 2024 at 07:03:46AM +0200, Oscar Salvador wrote:
> > On Mon, Jun 17, 2024 at 05:05:43PM +0000, Jiaqi Yan wrote:
> > > +   if (!sysctl_enable_soft_offline) {
> > > +           pr_info("%#lx: OS-wide disabled\n", pfn);
> > > +           put_ref_page(pfn, flags);
> > > +           return -EOPNOTSUPP;
> > > +   }
> >
> > We should not be doing anything if soft_offline is disabled, so this check should
> > be placed upfront, at the very beginning of the function.
> > Then you can remove the 'put_ref_page' call.
>
> Also, I would go for a pr_info_once here, as otherwise we can spam the log quite
> easy.

Nice catch. I will do pr_info_once in v4.

>
> --
> Oscar Salvador
> SUSE Labs





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux