Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp640916imm; Fri, 28 Sep 2018 04:33:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV61qRBX4oGwlaW/8ZvXK9VLuHMHoykSlKa+ZB0rXTpjLwOPCG8TZwA4fzEyKY8BiGni1rBAT X-Received: by 2002:a63:5b14:: with SMTP id p20-v6mr14710821pgb.56.1538134387035; Fri, 28 Sep 2018 04:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538134387; cv=none; d=google.com; s=arc-20160816; b=UdvabORfOeFb0MPsBrMnCDlGgzO//hX/UXVybJ8jS0MXPM/nkeY8qUO80EwTIyJnGI Ffzh/WsVeP0q/Ubz6Tg7f5mvp1ZMJeBbXh4z9vvtpkLXH4an/PaDrBOfsKwU5SR02CFO /W6jAy2tdanJzWaM+U4IDupvPnyMGUm7MZ5mJwvRkrVcCT/oWNDDJruCy0ZuhROWh885 9pISd/LgVAk6jk/FrlDYcFdtDohu7xWbELbuArxgprpUuMdB3ZN45MCtlvj/BTq4piG2 +lnSYvmDf9Gqq0idXIeqPA9lOXS64VjRRACeTUL7f0kQ/pB88pRjnfxvlZ3uckosCLXv 6taw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PFBDtUPBV1V5HLZsktWP88rJk+6AC328fc0bVHuNypk=; b=nrjjWkjlqF/J50NvI91pkwj9ndCKGev+24pIQ0OzymPeC/bpzjgXtc/z9FBrK3pRz5 tEI3FQzgzMyqxBR09+eMLo2wz8Yj+hEqvEiahpzv71jD1hhdDhbt7WwNWLh9yoExMJRe qishTSXLb8XC+ZS8tkSvzrLV415m75xR87N1oo2uigrg2NE08ehQnucGSuOC0NqFw6qu Br6nttLPl4QwHzbJpRlqr0d5InfMH+V83jpN0eBGssodLfX2BBWq0aKPa4Gh3u096t8m lz+3hVXkKOKVePVFVNPZVgxQh3w54KvoyP6NQpo4VaXKB2d+iSUWIONN5/ddGepi8VyZ 8Xjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=Vw2qj55D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f127-v6si5145447pfb.290.2018.09.28.04.32.51; Fri, 28 Sep 2018 04:33:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=Vw2qj55D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729479AbeI1RzQ (ORCPT + 99 others); Fri, 28 Sep 2018 13:55:16 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:34227 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729330AbeI1RzP (ORCPT ); Fri, 28 Sep 2018 13:55:15 -0400 Received: by mail-io1-f67.google.com with SMTP id h16-v6so3992697ioj.1 for ; Fri, 28 Sep 2018 04:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PFBDtUPBV1V5HLZsktWP88rJk+6AC328fc0bVHuNypk=; b=Vw2qj55DkddwiiiDUcVBw7IZJyfwpfV8ApjFH/xI4tt5xE+bdZgkpyMyGmrY6epuhZ jsYVGnvJCXGs11p/9BNXMZABLv1SYcM/853H5jL2Q8qY2gvFDh4wKPqTGbZZ6f3B9/KU I7zdBWJ7f4WdNHlYR85Ez/+nJqr5hM6GtwchY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PFBDtUPBV1V5HLZsktWP88rJk+6AC328fc0bVHuNypk=; b=pFyor/k1sM1kj69F643YO6w7SypYH+HLiT42wk/vyDrsGlUcHesCn9TIt5NFpgvn3w iG2plz7SxAgHwNwSXV/vnhzIaPxnDbg9HkSlp4/SmIKsYYW0ZKduJx65PE+vUYcfE/kv tAqfBvabMUl4iIT0PG52QOhks3p0rbRECo6Bv7XdQg3izQKfIvENJ+K3fhxmJMj7leuQ KOIPPgogBfY1e9DfPcL+Bl270kmeKL4NiFNYFzAPpcOj4SDqCem2wNj3n7J77ERLz14W i41NYJsJbmEYsXrMeCNBSPD0VU4XexJr6EkNVjj0X27HCl8t6+hutR/YNSR56UPEADmy O43A== X-Gm-Message-State: ABuFfoiEczNHKq+8EqWOmql8nBIcm7QiP+ByBz5rfiiiw//YbvX8DFQJ aLYv/LjDfu3l1okJIzv+yq9jjRsg2zsrSd4wBlA= X-Received: by 2002:a6b:671c:: with SMTP id b28-v6mr11071674ioc.22.1538134315156; Fri, 28 Sep 2018 04:31:55 -0700 (PDT) MIME-Version: 1.0 References: <1538079759.qxp8zh3nwh.astroid@alex-archsus.none> <153808275043.724.15980761008814866300@pink.alxu.ca> <1538082779.246sm0vb2p.astroid@alex-archsus.none> In-Reply-To: <1538082779.246sm0vb2p.astroid@alex-archsus.none> From: Dan Streetman Date: Fri, 28 Sep 2018 07:31:18 -0400 Message-ID: Subject: Re: [PATCH v2] mm: fix z3fold warnings on CONFIG_SMP=n To: alex_y_xu@yahoo.ca, Vitaly Wool Cc: Linux-MM , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 5:15 PM Alex Xu (Hello71) wrote: > > Spinlocks are always lockable on UP systems, even if they were just > locked. > > Cc: Dan Streetman I cc'ed Vitaly also, as this code is from him, but the change certainly looks correct to me. Acked-by: Dan Streetman > Signed-off-by: Alex Xu (Hello71) > --- > 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 >