220 40978 <1f8aee48-8a20-0f42-b180-bf1d31a47530@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Anthony Williams <anthony.ajw@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Thread preemption inside RCU protected section
Date: Mon, 12 Nov 2018 06:52:51 +0000
Lines: 45
Approved: news@gmane.org
Message-ID: <1f8aee48-8a20-0f42-b180-bf1d31a47530@gmail.com>
References: <88ff3707-f1d9-42ae-ac2d-3e926ff32350@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1542005450 21301 195.159.176.226 (12 Nov 2018 06:50:50 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 12 Nov 2018 06:50:50 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.3.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD65DK5LTQNBBR6GUTPQKGQECD7UA7Y@isocpp.org Mon Nov 12 07:50:46 2018
Return-path: <std-proposals+bncBD65DK5LTQNBBR6GUTPQKGQECD7UA7Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm1-f71.google.com ([209.85.128.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD65DK5LTQNBBR6GUTPQKGQECD7UA7Y@isocpp.org>)
	id 1gM63Z-0005Re-Gg
	for gclcip-std-proposals@m.gmane.org; Mon, 12 Nov 2018 07:50:45 +0100
Original-Received: by mail-wm1-f71.google.com with SMTP id d26-v6sf8270657wmb.4
        for <gclcip-std-proposals@m.gmane.org>; Sun, 11 Nov 2018 22:52:56 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1542005576; cv=pass;
        d=google.com; s=arc-20160816;
        b=ixhdwdi7x/LVnG1YdOLxxnv7WR4uCMJi6YQJTPHnC/e6uKRVxO/gGlRcLro9ez3odg
         ThvUPc5aLTDkSp/983fEF9ibpDyDb313fR2HO/DA8NmZml3rSBZPB+zr5YgqJa60m7C4
         vMghmDKhK1EzkrghG0GYbe+jERSq+JZV8C6C42Dsajn2z57TNNb6QG95pGAn1yIifY4i
         IHMflaPa8lqy8F265nCSkzADLYNBZTGT4bcIf8olV6W6rqjAJWXExJihEeqP1oPX6kwc
         6uRCPyoJPXavbVkfI0xHfzHb7rW1V4y97mxMWrt5D2zb6EB/BNIZdZPIv3yZkpmZGpvD
         E9Mg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-transfer-encoding
         :content-language:in-reply-to:mime-version:user-agent:date
         :message-id:autocrypt:openpgp:from:references:to:subject
         :dkim-signature;
        bh=B2l1i0u+K44EXivbeKMMGo+ZBTDxuLkbCKwQdBGFTec=;
        b=tUhv/rOsAKffTuwubXbrhFTj1erSbd3MEoG73i/Y5PjzvW3mfvdeXxL+46Civyu89t
         RbZKibs5IlBh72VfSBF9SsOLal6v1d0Lyp7gSulw3YqJWUw7W/OCUVnnZQAY1WWrxsEO
         M+yVMEF5drF68aiIOZ5P0/A/YlbH4M8IZyw7O950PTl9h9IaW2fZnyqNLTWe/FewV9tk
         qPBQX1ONpsSBTH9mH0fnf+FvjOal/Czllhg+x/sR54I60h+8WLvab10BrKuRxhwCugEm
         HYKbJQvzErp0OMkG2/m7ifpccIzt2+fOYwE1GmYsbQjon+iEf4997LUGfRwnWuY4XKPl
         LwqA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b="nTXwPXH/";
       spf=pass (google.com: domain of anthony.ajw@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=anthony.ajw@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:openpgp:autocrypt:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=B2l1i0u+K44EXivbeKMMGo+ZBTDxuLkbCKwQdBGFTec=;
        b=HJajTCvvuxeo4ZCp44+oxuVP0ejehvJkp7vtvox42CliZz71kLwfrEok6M0Jq11L6B
         1UishYaIzleBzCwzqPn264wCoNiTV2p4zt98iqMeh6Yi5SbW2ztvJeX/UkUevYC5gxny
         IoAgc//iW3WOyZO7EmxTbtq/0ELdXW01TaRCxbbDIeGJPaMMGvBKY0KPZdOBBcmHYF3W
         7ED44nl6olymf3t5NvcNCR5YzAJxs6byLtkhwRFd96KSx5x6w7VFv4A7s/UrcRZObEhE
         8bFWJQNlWhb8C14k34PZc5qZe6tc9IjmTy8dIN9BfgMXqgSaHTsHz 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt
         :message-id:date:user-agent:mime-version:in-reply-to
         :content-language:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=B2l1i0u+K44EXivbeKMMGo+ZBTDxuLkbCKwQdBGFTec=;
        b=FuhW8GuWsRL28kkyBrodBna3P8elwHpT451Omr4f5Uw8Qs7oMWWcrUY8PkhWbZKney
         fgkd5I4LRxV5493bqrdHcLZbUQo6k/mNPLbCRSvTTMs/jL5iHk/LQRKOV8JJ3alWFaZe
         wR5vFoHRauTT5MfChfGFgzSEMSCyeifmXWkL9S9KetBWbjLelDvJyac4k0uVGMwRa1G2
         ztdnluyHZsnfZOlafHlLxMtDQx7tzq7WM9lxfGHq8CZXktbMm4p3X3Z/ZJ4UJ/uTBjys
         eq1iFqCe+3evapcnhQwB0UR7N 
X-Gm-Message-State: AGRZ1gLflIXN7PIUc9AVeikUqiwxfRa1MjDgT8wtv5EHTdNhOzvFMjow
	7lFfKzjvFtcZQSvjhryzW+aluQ==
X-Google-Smtp-Source: AJdET5eQn8sjM9W8R7JVqqCx4KZPi92A+kplDatTsX58tFzzK3Xyu6yNo5iJUlHtJOjrcQDBvG1zHw==
X-Received: by 2002:a5d:4dd0:: with SMTP id f16-v6mr584825wru.10.1542005575976;
        Sun, 11 Nov 2018 22:52:55 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a1c:8f0b:: with SMTP id r11-v6ls1648771wmd.3.gmail; Sun, 11
 Nov 2018 22:52:54 -0800 (PST)
X-Received: by 2002:a1c:dc83:: with SMTP id t125-v6mr4779619wmg.78.1542005574618;
        Sun, 11 Nov 2018 22:52:54 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1542005574; cv=none;
        d=google.com; s=arc-20160816;
        b=PYOqQy3ON88GxOZqij99Uc9do6q2C78rU5UJFET3/RnlEpS+INGZuwM2E5qJyNlPs5
         cEuhfxv5qA46cZSmutp/uZUSmkXMVD8Tzh6Iis86f5s58lAhYwZr49AFNoRGOnBZliHo
         XFHi+wk4PGtxpAZ1p15gH09X3BbFbM60YP4+Iw4SOXptJxpoR4Ct5CgBaRIpnqKb+yoU
         yTgjBehr7Nscghdj/kfme+4v2TIeWSD8lzXQlbzzC4b/XPaBn2ruzS9Q9IsBlZ2lHhDl
         ZP2T0d6pHUSQTIMf7h1X6OpK0X2xfPCPDaoR6qoHsjLEJ2g8IoJ34+5sKmBrfGN6K5t7
         o6cQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:content-language:in-reply-to:mime-version
         :user-agent:date:message-id:autocrypt:openpgp:from:references:to
         :subject:dkim-signature;
        bh=3bDuag7lZ0itdBmf6+7juNLbwowO/RBtkc6hHrCRpMc=;
        b=Q92AEGnoAhaqf205qEf7vmMc7YD15lmX6yfMoIu1UMWxzXJ/3L/fpgQH7IAnX5660z
         SYnvhk5loBF7cP9Wwrrkq+4csc2KcQ1BhPyXx6603P2kOYOWQ0+MjzzKHzDRJh5qIXdN
         e5vORy+zigdS4q3046dZ8gEw05DIelgqKAKYWoh26dILdPPP25VTDvUbxv9KBW5u1xrZ
         cNlAkEMgd8aUiMDwTPSDrJnZdPolz70uilDnWfZqxpOMsAaKCEREH1+hh1QOZ75M9jb+
         OblZXAwf7LWqZennId//R3SwYRppyiPuzsiGuhbjmkCwt3VHZzQsCI2IXCu4sRdA/FU6
         Icdw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b="nTXwPXH/";
       spf=pass (google.com: domain of anthony.ajw@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=anthony.ajw@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id 62-v6sor9789012wra.51.2018.11.11.22.52.54
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sun, 11 Nov 2018 22:52:54 -0800 (PST)
Received-SPF: pass (google.com: domain of anthony.ajw@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:adf:ffc9:: with SMTP id x9-v6mr15844763wrs.73.1542005573929;
        Sun, 11 Nov 2018 22:52:53 -0800 (PST)
Original-Received: from [10.8.0.11] (terminus.justsoftware.org. [178.79.187.92])
        by smtp.gmail.com with ESMTPSA id f68sm2795906wmd.15.2018.11.11.22.52.52
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 11 Nov 2018 22:52:52 -0800 (PST)
Openpgp: preference=signencrypt
Autocrypt: addr=anthony.ajw@gmail.com; prefer-encrypt=mutual; keydata=
 xsFNBFKLKCcBEACsieh8DThKfzIRYsUCdaZn6LHywphYGl/+Y0pDYqWvKgG0j00ril1WdCbj
 8p/DTS9E+dYNZnhY3KyM1rhCGPUJ1jMtDZD5XhDWMKIFmVu5htNzs1/198IuPT6dnn0uY/Le
 cPmBYo9In/Xp5VRDTbjg0g2OnbCK+3Lg3C9f5b7Fb8kz/DlD8WNOBODRYz7JGjMakvBixoSk
 ECUMF1fFs2mG6trIl1W+90pr8dYL4KhRkew1SVnAkiICmCx+Lq7zEurkrQH98sVLzJdB7mAB
 3u/DHU6otXS6S7O2+T8MdufvYVqILjAHpRyJP9k8Jbxh4X4bgwLwDDCIiFPiaXIcS2YZmGlV
 gQ/wHCCDP7mqu2RTnfaWGTqd98Ka2jvzQoGDQ7j80Fb+1GIldY5L/jTj6QbJrIZA94+qwGcA
 hH1+p8IajxjMzs9SzpwSNCDyqqpOGi/NduBvwyIvOPB9NCerMRmJg1EPNb6TKHyPMeWrmA+b
 gtdXb96H1gTKG9s2CPKI4SOsjQn7/mmIp9/XsroX/EYo/7n1mPUE8A6dEfLtlUbrXUIixvHg
 7Ba/ao74Quv0T1BQi5PnAUU7UKwYz5B10PPWZerZSd3NZ1tupTYZsphYl+/QEIRM62nKVBvT
 uyjAx16E8ldMH+VIltxWn6uxFXMNHlQ/qYKgz9sva1LA1AY3/QARAQABzTZBbnRob255IFdp
 bGxpYW1zIDxhbnRob255QGp1c3Rzb2Z0d2FyZXNvbHV0aW9ucy5jby51az7CwX4EEwECACgC
 GyMGCwkIBwMCBh 
In-Reply-To: <88ff3707-f1d9-42ae-ac2d-3e926ff32350@isocpp.org>
Content-Language: en-GB
X-Original-Sender: anthony.ajw@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b="nTXwPXH/";       spf=pass
 (google.com: domain of anthony.ajw@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=anthony.ajw@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:40978
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40978>

On 11/11/2018 21:34, Itaj Sherman wrote:
> What happens if a user thread enters a section protected by a locked
> rcu_reader instance, and gets preempted by the scheduler inside the
> section?!

Nothing.

> When it wakes up, it supposedly continues to run inside the section.
>=20
> Which means that all rcu protected objects used inside the section have
> to be delayed for a long time until after the thread gets scheduled again=
..

Yes.

> I want to propose the following suggestion. I really am not sure if it=E2=
=80=99s
> feasible, it needs compiler and OS support that I=E2=80=99m not sure is a=
lways
> available.

It is unnecessary. RCU is designed to cope with long grace periods
before reclamation, precisely due to issues like this.

At kernel level, you already have the ability to mark sections of code
non-preemptable.

At user level, this would require the ability to run code when the OS is
preempting you (in order to remove the RCU read tag), which is against
the very concept of preemption, so it is not implementable.

Cheers,

Anthony

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/1f8aee48-8a20-0f42-b180-bf1d31a47530%40gmail.com=
..

.
