linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Wool <vitalywool@gmail.com>
To: Dan Streetman <ddstreet@ieee.org>
Cc: alex_y_xu@yahoo.ca, Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mm: fix z3fold warnings on CONFIG_SMP=n
Date: Fri, 28 Sep 2018 13:42:58 +0200	[thread overview]
Message-ID: <CAMJBoFPHK1i1TpYDoH4R5_ZC97xQomy6XSkJJK5w7LU88pcxeQ@mail.gmail.com> (raw)
In-Reply-To: <CALZtONBUR2X8hLG59=JitZqAr0aOO+TWkf6Reke9DHkVu-9_wQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]

Den fre 28 sep. 2018 kl 13:31 skrev Dan Streetman <ddstreet@ieee.org>:

> On Thu, Sep 27, 2018 at 5:15 PM Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
> wrote:
> >
> > Spinlocks are always lockable on UP systems, even if they were just
> > locked.
> >
> > Cc: Dan Streetman <ddstreet@ieee.org>
>
> I cc'ed Vitaly also, as this code is from him, but the change
> certainly looks correct to me.
>
> Acked-by: Dan Streetman <ddstreet@ieee.org>
>

Acked-by: Vitaly Wool <vitalywool@gmail.com>

>
> > Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
> > ---
> >  mm/z3fold.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/mm/z3fold.c b/mm/z3fold.c
> > index 4b366d181..2e8d268ac 100644
> > --- a/mm/z3fold.c
> > +++ b/mm/z3fold.c
> > @@ -277,7 +277,7 @@ static void release_z3fold_page_locked(struct kref
> *ref)
> >  {
> >         struct z3fold_header *zhdr = container_of(ref, struct
> z3fold_header,
> >                                                 refcount);
> > -       WARN_ON(z3fold_page_trylock(zhdr));
> > +       WARN_ON_SMP(z3fold_page_trylock(zhdr));
> >         __release_z3fold_page(zhdr, true);
> >  }
> >
> > @@ -289,7 +289,7 @@ static void release_z3fold_page_locked_list(struct
> kref *ref)
> >         list_del_init(&zhdr->buddy);
> >         spin_unlock(&zhdr->pool->lock);
> >
> > -       WARN_ON(z3fold_page_trylock(zhdr));
> > +       WARN_ON_SMP(z3fold_page_trylock(zhdr));
> >         __release_z3fold_page(zhdr, true);
> >  }
> >
> > @@ -403,7 +403,7 @@ static void do_compact_page(struct z3fold_header
> *zhdr, bool locked)
> >
> >         page = virt_to_page(zhdr);
> >         if (locked)
> > -               WARN_ON(z3fold_page_trylock(zhdr));
> > +               WARN_ON_SMP(z3fold_page_trylock(zhdr));
> >         else
> >                 z3fold_page_lock(zhdr);
> >         if (WARN_ON(!test_and_clear_bit(NEEDS_COMPACTING,
> &page->private))) {
> > --
> > 2.19.0
> >
>

[-- Attachment #2: Type: text/html, Size: 3036 bytes --]

      reply	other threads:[~2018-09-28 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 20:27 [PATCH] " Alex Xu (Hello71)
2018-09-27 20:41 ` Dan Streetman
2018-09-27 21:12   ` Alex Xu
2018-09-27 21:15     ` [PATCH v2] " Alex Xu (Hello71)
2018-09-28 11:31       ` Dan Streetman
2018-09-28 11:42         ` Vitaly Wool [this message]

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=CAMJBoFPHK1i1TpYDoH4R5_ZC97xQomy6XSkJJK5w7LU88pcxeQ@mail.gmail.com \
    --to=vitalywool@gmail.com \
    --cc=alex_y_xu@yahoo.ca \
    --cc=ddstreet@ieee.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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