All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Rafael Aquini <aquini@redhat.com>,
	Jon Masters <jcm@jonmasters.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Mark Salter <msalter@redhat.com>, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: tlb: skip tlbi broadcast for single threaded TLB flushes
Date: Wed, 12 Feb 2020 07:57:57 -0500	[thread overview]
Message-ID: <20200212125757.GD3699@redhat.com> (raw)
In-Reply-To: <20200211140025.GB153117@arrakis.emea.arm.com>

Hello,

On Tue, Feb 11, 2020 at 02:00:25PM +0000, Catalin Marinas wrote:
> I think there is another race here. IIUC, the assumption you make is
> that when mm_users <= 1 && mm_count == 1, the only active user of this
> pgd/ASID is on the CPU doing the TLBI. This is not the case for
> try_to_unmap() where the above condition may be true but the active
> thread on a different CPU won't notice the local TLBI.

The "current->mm == mm" check is what shall prevent the above.

Thanks,
Andrea


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <aarcange@redhat.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>, Jon Masters <jcm@jonmasters.org>,
	Rafael Aquini <aquini@redhat.com>,
	Mark Salter <msalter@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: tlb: skip tlbi broadcast for single threaded TLB flushes
Date: Wed, 12 Feb 2020 07:57:57 -0500	[thread overview]
Message-ID: <20200212125757.GD3699@redhat.com> (raw)
In-Reply-To: <20200211140025.GB153117@arrakis.emea.arm.com>

Hello,

On Tue, Feb 11, 2020 at 02:00:25PM +0000, Catalin Marinas wrote:
> I think there is another race here. IIUC, the assumption you make is
> that when mm_users <= 1 && mm_count == 1, the only active user of this
> pgd/ASID is on the CPU doing the TLBI. This is not the case for
> try_to_unmap() where the above condition may be true but the active
> thread on a different CPU won't notice the local TLBI.

The "current->mm == mm" check is what shall prevent the above.

Thanks,
Andrea



  reply	other threads:[~2020-02-12 12:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 20:17 [RFC] [PATCH 0/2] arm64: tlb: skip tlbi broadcast for single threaded TLB flushes Andrea Arcangeli
2020-02-03 20:17 ` Andrea Arcangeli
2020-02-03 20:17 ` [PATCH 1/2] mm: use_mm: fix for arches checking mm_users to optimize " Andrea Arcangeli
2020-02-03 20:17   ` Andrea Arcangeli
2020-02-18 11:31   ` Michal Hocko
2020-02-18 11:31     ` Michal Hocko
2020-02-18 18:56     ` Andrea Arcangeli
2020-02-18 18:56       ` Andrea Arcangeli
2020-02-19 11:58       ` Michal Hocko
2020-02-19 11:58         ` Michal Hocko
2020-02-19 20:04         ` Andrea Arcangeli
2020-02-19 20:04           ` Andrea Arcangeli
2020-02-03 20:17 ` [PATCH 2/2] arm64: tlb: skip tlbi broadcast for single threaded " Andrea Arcangeli
2020-02-03 20:17   ` Andrea Arcangeli
2020-02-10 17:51   ` Catalin Marinas
2020-02-10 17:51     ` Catalin Marinas
2020-02-10 20:14     ` Andrea Arcangeli
2020-02-10 20:14       ` Andrea Arcangeli
2020-02-11 14:00       ` Catalin Marinas
2020-02-11 14:00         ` Catalin Marinas
2020-02-12 12:57         ` Andrea Arcangeli [this message]
2020-02-12 12:57           ` Andrea Arcangeli
2020-02-12 14:13   ` qi.fuli
2020-02-12 14:13     ` qi.fuli
2020-02-12 15:26     ` Catalin Marinas
2020-02-12 15:26       ` Catalin Marinas

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=20200212125757.GD3699@redhat.com \
    --to=aarcange@redhat.com \
    --cc=aquini@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=jcm@jonmasters.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=msalter@redhat.com \
    --cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.