From owner-svn-src-head@freebsd.org Thu Nov 28 09:17:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDB521CA4AC; Thu, 28 Nov 2019 09:17:55 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 47NsVp007Cz4JGX; Thu, 28 Nov 2019 09:17:53 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [192.168.42.12] (cpc91220-cmbg18-2-0-cust60.5-4.cable.virginm.net [81.104.142.61]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id C07FC4E630; Thu, 28 Nov 2019 09:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; s=mail; t=1574932636; bh=8PhIzAGQUCB8zkCVuR4R9rHRIvp0aKrMR3cCNCNkvn4=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=W8FXoMohxRWV/Jtu06dmpYfzCJimLZo7x9oJfwxd4c3M7BerRxtBczbWCH9syYvPX DZynZIGVihUdonds807ARsV3Ao8/5tJgrPQRvVMtdDNbzCe4WfQUVz2YBP7JT2QPLT 29oinZcRZWd5O8ZHlUavHFZGZ8A8ABNRafMmRD13kdILaH3r8BcLZBX1Xcl3fgKhC7 tKFL0tCCLnP9i6VyT+Rwy2wt7jvB7EVl9+tAk6cS4HfYbRErNZCHMFmPhJD/1N7lRW WvyMv6JhMYu+acJNhqKqDF/DmnHVojZWY37yZ20IVCa4AER6q0olNRbcmiskA5qxv+ zbiR9tmO62W3vysbdHS7Xct8pyCBAJLNRrTjN8GouLDruIdPGDj6j0lC9Lg0hhOIYO MMJIE5IOVtYZYwP3BrSForeJ2CEFXc3TY70hIBkN2PYoxM124Z9Qi1NhvWNnQEhwkb TmXnkDis20+HGTOoSvhckILpxyKPyN96L0KklyNFVsqOfv+VXaq4fDUq6DRW44Na1W PswwEUYw8VWuCWpbQgn0DM8dM3STDIl/fx0OLe0vDmF1O1Km2rXA8CV0pz+lqZhS7x WhYj2QPaiJ+luJfulDINR1m1X2lZOeHT9ldPxA85ACqoCcmQ5xQv0OXkP9nP9QKqzr JdJBfKzoMoM1oohiHxPFX/84= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r355145 - head/sys/arm64/arm64 From: Andrew Turner In-Reply-To: Date: Thu, 28 Nov 2019 09:17:15 +0000 Cc: Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201911272033.xARKXowX014908@repo.freebsd.org> To: meloun.michal@gmail.com X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 47NsVp007Cz4JGX X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fubar.geek.nz header.s=mail header.b=W8FXoMoh; dmarc=pass (policy=none) header.from=fubar.geek.nz; spf=pass (mx1.freebsd.org: domain of andrew@fubar.geek.nz designates 139.59.165.16 as permitted sender) smtp.mailfrom=andrew@fubar.geek.nz X-Spamd-Result: default: False [-1.86 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[fubar.geek.nz:s=mail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[fubar.geek.nz:+]; DMARC_POLICY_ALLOW(-0.50)[fubar.geek.nz,none]; IP_SCORE(-0.96)[ip: (-4.45), ipnet: 139.59.160.0/20(-2.23), asn: 14061(1.91), country: US(-0.05)]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[61.142.104.81.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:139.59.160.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 09:17:55 -0000 > On 28 Nov 2019, at 08:48, Michal Meloun = wrote: >=20 >=20 >=20 > On 27.11.2019 21:33, Alan Cox wrote: >> Author: alc >> Date: Wed Nov 27 20:33:49 2019 >> New Revision: 355145 >> URL: https://svnweb.freebsd.org/changeset/base/355145 >>=20 >> Log: >> There is no reason why we need to pin the underlying thread to its = current >> processor in pmap_invalidate_{all,page,range}(). These functions = are using >> an instruction that broadcasts the TLB invalidation to every = processor, so >> even if a thread migrates in the middle of one of these functions = every >> processor will still perform the required TLB invalidations. > I think this is not the right assumption. The problem is not in TLB > operations themselves, but in following 'dsb' and / or 'isb'. 'dsb' > ensures that all TLB operation transmitted by the local CPU is = performed > and visible to other observers. But it does nothing with TLBs emitted = by > other CPUs. > For example, if a given thread is rescheduled after all TLB operations > but before 'dsb' or 'isb' is performed, then the requested > synchronization does not occur at all. The tibi instructions need a context synchronisation point. One option = is the dsb & isb instructions, another is an exception entry. For a thread to be rescheduled it requires the timer interrupt to fire. = As an exception entry is a context synchronisation point and an = interrupt will cause an exception entry there will be such a point after = the the tibi instruction. Andrew