From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: SIGPROF + SIGCHLD and igc Date: Sat, 28 Dec 2024 20:51:06 +0100 Message-ID: <87msgfmvrp.fsf@gmail.com> References: <87o713wwsi.fsf@telefonica.net> <87a5ch5z1b.fsf@gmail.com> <87plld5pev.fsf@protonmail.com> <87ed1t6r34.fsf@gmail.com> <875xn46s6z.fsf@gmail.com> <86bjwwulnc.fsf@gnu.org> <877c7jlxsu.fsf@gmail.com> <86frm7sx4d.fsf@gnu.org> <87a5cfoivh.fsf@gmail.com> <87r05reh9t.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38810"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , gerd.moellmann@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, acorallo@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 28 20:52:08 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tRcr1-0009zZ-DH for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Dec 2024 20:52:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRcq7-0007XB-Si; Sat, 28 Dec 2024 14:51:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRcq6-0007Wk-Qo for emacs-devel@gnu.org; Sat, 28 Dec 2024 14:51:10 -0500 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRcq5-0000Rj-GQ; Sat, 28 Dec 2024 14:51:10 -0500 Original-Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5d3f65844deso12948693a12.0; Sat, 28 Dec 2024 11:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735415467; x=1736020267; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZN+U61d1CP1WI2HLvMnFChqFcKw1K2G47i/icdtEcdA=; b=eY9S6z6O8jkqaRE7BjIuhk/0Tz+lpeVV7XrRrYyU5JgUU7qq2LdDGlMQnoBjcmyE1H kUT2nbx2m8WePM7Ftm2K+xpTgEgdpeMtaTfmcUhHlC7Rzj+MLSNV944qNyVPGrXmQTm/ Yu4fPZVay5wT7i8+gFbNJH0hhILu8koxkv8gQkSpk4XTt1lOLhe8b7sGzGgBc+GEzkfJ C94xy3P2P+T9yFAHluCOTPQk24hQGVGJ2/bsth8dUT2++Bu0vq/o1VG3CnZtB9QyNlrx GF/0030l+CGB1Wsek5/9IaNcOBK1Xx35geGDglweV18zM/COan2VIQa8FHnZI2RyT8nU eytw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735415467; x=1736020267; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZN+U61d1CP1WI2HLvMnFChqFcKw1K2G47i/icdtEcdA=; b=MTYkVsmatq8cptT6wNxp7PQOHecNKoBnr+vaUXsRTWu76qnybjrNSwAHlw9NnYBtke jPI0BETfuhqhxfpefSz3HNhCbyCNqH/EuM/YUk6mm9/FTi3NcTrerWeHrWacDKeMKE39 4VwjkRL7MNDfC+xNDEh2siso2hnroFuWsdVl0Cwfw5rs2EzCF1NDURqcIllrSirDti/T i0tqUzXKqnWGRHXczfhLkeG+DZ4dh0kgSD/RxjVDuzhWaNPacmCfZsAePrY3PanOSF+0 HSjFBAvcDpnZ/BbaXamQTndakKLXSXaZAl5DUC3M4Y6b3lUpqMCTSlabK4YcGg3ahYht vVTg== X-Forwarded-Encrypted: i=1; AJvYcCUMweaXtVG689Vdt4sNTIFhGhBbCEAHSOGHV4ynjumwPUmX/l3MpYl0tZ9bXzCBfwE9SaAgQwspDvCGHlU=@gnu.org, AJvYcCVAIvP0dOMWWUHzZzY4t0YUfrgLAIJvkrXV6AQTBcqydZ0SA6VrzjcrpHB8y3AnfHSrcugTO1Sw/w==@gnu.org X-Gm-Message-State: AOJu0YwWtdKwpE1VQd+kMBGEU99U8lqUV843++7uU08sr+rBZtLLdyJT 8LH19atcvlMX8qIEk6XSzYfkM5N0KGjl1sHW+4RKvvcEhN8pqqbCTRq1cncm X-Gm-Gg: ASbGncuN3ybex+qOvtTBSqjVcTHRKakUfGV5KDnHXv45DA4XUFtla81Dwj4yv0TBhVp gJ10QC+tRM/tT5lLDYV0i/tNsY0XiJOkcLI8E+Kp2gyxzqaKwLsAtgp2lt5l9R75hGkXYVSzCDe LUREW41cN1osNn2GVLFDR9KnJGdeTyJuNv9bpsB4cmOzTTte1jC5KhuD6zSGnYfCMhXnC7SwEfV Rq3d9hodmXmW3h5DdXUwJwyBPraBbeDMd8UrdUN2AXBGogYMjjXHjk= X-Google-Smtp-Source: AGHT+IGXIsf0OI7gY0C4LGGJ1dKHJVSHwXuB/6+wYL4Dcqtbg6cYrrdwMzvwVoYpdchTAecKFJEWkQ== X-Received: by 2002:a17:907:86a5:b0:aa6:423c:850e with SMTP id a640c23a62f3a-aac334bc14amr2712528766b.27.1735415467002; Sat, 28 Dec 2024 11:51:07 -0800 (PST) Original-Received: from caladan ([31.177.115.143]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f073333sm1270016566b.203.2024.12.28.11.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 11:51:06 -0800 (PST) In-Reply-To: <87r05reh9t.fsf@protonmail.com> (Pip Cet's message of "Sat, 28 Dec 2024 19:32:21 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=eller.helmut@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327295 Archived-At: On Sat, Dec 28 2024, Pip Cet wrote: >> I think I see what you mean. I imagine the profiler thread to be a loop >> like >> >> while (true) { >> sleep () >> ArenaEnter () >> pthread_kill (SIGPROF, ) >> wait () >> ArenaLeave () >> } > > I'm not really following. Did you mean to include a call to a "clear > all memory barriers" function after the ArenaEnter call? If not, the > SIGPROF handler (and all handlers interrupting the SIGPROF handler which > aren't being delayed) would not be able to access MPS memory, which I > thought was the goal. In my mind it works like this: when the SIGPROF handler tries to access MPS memory, the SIGSEGV handler kicks in as it usually would in a non-signal handler context. This should work because at the beginning of the SIGPROF handler we guarantee that MPS doesn't hold the arena lock. Helmut