Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1286344rdb; Fri, 1 Dec 2023 11:47:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYH2lyKKaANDL5CokfHanUPMDNnBo0+reLGLy1mIQ784+syOYScZ5TV5RkuwqUhVYKXUFJ X-Received: by 2002:a05:6a20:7f99:b0:18d:64a:e125 with SMTP id d25-20020a056a207f9900b0018d064ae125mr95464pzj.31.1701460062243; Fri, 01 Dec 2023 11:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701460062; cv=none; d=google.com; s=arc-20160816; b=CZp8C4tR/fD8lXtqwZZN1yZh945Pe8i6DpQ0DPDHP8QuTKoUC+qgVcR2W0XOeIVIBI 3W2zapvWwvK+wPL09ZfJmDqAtmJjqr8dugkAPCNzLNomrR7K1GB5kDvsF2mlkpFeqxkb 55QHqMGwsuwClYN+l06lvDhcjjghtgEIZRplHT2iK34RmCZ+6ZDIaQgXcOsb0YCPqQc2 uM2Qbc0yRD0MZQWm2iXfpvPI5wlnkWwegzwrBek+RoWEOS2Pmwf+YgnLRNy4KePvZ8GY /J8dC6V5j9oln/sdgPwh31CTlCT73NFoUO4qBr1YSKbR1qbi6swWg6liGhObk0UfJYZ7 CQbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=esQHtc5EMGBTBgMfzuKS990BZj28p3wG+l2ATH+x5MU=; fh=2JElE3p5cfpFJvyqBfwW9W9DH1zV6bllGZsxR6YIshw=; b=Ergbquku8f6VJ2+RWHEGEegxR1aPmYE9dMAE9Gx4AtJ8WzS3Mzmilp0yeFZop1Fa3E iTbdLiLnzuC1KwBJJ1Pxa1TR/2P8s8gIjH7U2B/g/4X9UW+5DQA24FcFELaWqdSMrAVj Zr7hhJhaDYnnLpjCOMXUM00CaoWnaMauI59N4GN36V4Bq1N+jYHFyndQ+8lr4YoGCRG2 bmAlAuJuL4mtHRA93hhjJQzjygSszXwe2JhKkX7gP4EL3D1pLuyI+xhK77UuMqrjtrQ1 mf1B2JtWNV6A+THgoopu1NvebSgEhGc55V953p7kgizWfF9zskrKvR3pMSJ4HsqEMbrl Lb1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=jCrDZGli; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u21-20020a056a00125500b006cb83204cffsi3839846pfi.256.2023.12.01.11.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 11:47:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=jCrDZGli; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7B537828FACA; Fri, 1 Dec 2023 11:47:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379535AbjLATrW (ORCPT + 99 others); Fri, 1 Dec 2023 14:47:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379522AbjLATrV (ORCPT ); Fri, 1 Dec 2023 14:47:21 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D8E128 for ; Fri, 1 Dec 2023 11:47:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1701460043; bh=foA2StCe+zumNr+evTpB9NCVEmf//UE2RjTnry8IR+4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jCrDZGli1l5kneFcuBCFiY8Kp4yd5dwcjj58G2BMpPRCIyZjuI8BnCb60vAztvp8t AmqtBuvSuvrDDtdIyrQaFf+hEktGnGsw9PXT4lM7ZnPBoK8rRnRVjsdBCzLPqDLM1p X8/ecRsigTZNAPoRH+wtOBQ/C3c+SDvdxGgcf1nkdc16fk1ahW2nhh8p/SLzYcqoxr 5KuhUXaOrnlpcNWnF2XiM865kKm1jRCBzAPtyhzz3SJclCvNNhlTlXvIKsZNBzili5 YyiiE2eWXOGbVSxE8nEcz44mTVzo8rz4v6Q/pCMPpjPoRqjoi5STEm6qwN0mgdg7GK qzDIHJ4xIffww== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Shk9R4FQjz1fB5; Fri, 1 Dec 2023 14:47:23 -0500 (EST) Message-ID: <462218f5-ff1a-4051-ad22-f9de633696e3@efficios.com> Date: Fri, 1 Dec 2023 14:47:23 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Summary of discussion following LPC2023 sframe talk Content-Language: en-US To: Peter Zijlstra Cc: rostedt , "Masami Hiramatsu (Google)" , Indu Bhagat , "carlos@redhat.com" , Josh Poimboeuf , "Jose E. Marchesi" , Mark Rutland , Brian Robbins , Diamon discuss , linux-kernel References: <20231115154912.GC8262@noisy.programming.kicks-ass.net> From: Mathieu Desnoyers In-Reply-To: <20231115154912.GC8262@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 01 Dec 2023 11:47:38 -0800 (PST) On 2023-11-15 10:49, Peter Zijlstra wrote: > On Wed, Nov 15, 2023 at 10:09:16AM -0500, Mathieu Desnoyers wrote: [...] > >> - When we have a good understanding of the JIT requirements in terms >> of frame description content, the other element that would need to >> be solved is how to allow JITs to emit frame data in a data structure >> that can expand. We may need something like a reserved memory area, with >> a counter of the number of elements which is used to synchronize communication >> between the JITs (producer) and kernel (consumer). > > Again, huh?! Expand? Typical JIT has the normal epoch like approach to > text generation, have N>1 text windows, JIT into one until full, once > full, copy all still active crap into second window, induce grace period > and wipe first window, rince-repeat. > > Just have a sframe thing per window and expand the definition of 'full' > to be either text of sframe window is full and everything should just > work, no? Is the generated text reachable (for execution) before the end of the window during which it was created, or is there some kind of epoch delay between text generation and the moment where it becomes reachable ? If there is a delay between code generation and the moment where it becomes reachable (e.g. a whole epoch), then I understand your point that we could consider the whole jitted text window as belonging to a single sframe section and register it in one go to the kernel. The overhead of the system call would be amortized over the epoch duration. However, if JITs are allowed to incrementally add text to the current window and make it immediately reachable, then we need to have some way to synchronize appending "sframe functions" into a memory mapping that do not require issuing a system call every time a new function is jitted. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com