Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp298756pxb; Thu, 9 Sep 2021 00:53:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxbFJogYMEyAVOCwwgyvCKnveVd0JaIapBgXrw1W0sximbyCoT+J7wLEuyBL83o4y+Hbw2 X-Received: by 2002:a5d:9247:: with SMTP id e7mr1584276iol.161.1631174027231; Thu, 09 Sep 2021 00:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631174027; cv=none; d=google.com; s=arc-20160816; b=U1aFiQ73uYhjvhNV6t0G/OQD63wpkJjUWe96MvCqoybKBA7G5hni7krKBqZn+eGLkp eTXR2CZ860QHVLwte2OC37zA/pm9NHaR7KpnQGPb97cnQ+nvDoQQAsbAHkA1dr6kBg+j jqsI+8wvbI/pgBcmCE2S+DCtzHJt7zYQOiM2HdCg5ZREvoJqGKfHNAJbbQsy6g+/Rbn+ Q19UvBmWWXH+845lb4+x2LO+DCHznyCMObnuVF7K3sXu0LWpKoEwbpB4IISJSZtAIl8L ilRe5F6NRqGomtmH88VXtyYaNtmlqJDwqUNIMNAbGReGFmi/40Mc1zEQvX/l7REyNQuM AZ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eyHlaFXMQlBGAgVK+ai3Qs+r4txYD4v/DqXWZ1zN1Y8=; b=hZO5KJ7DTZe82cJoujSnSHN5m0NV9Y16RVexB6zmiqrHZ3HCy/2OUe0KKInn0OR44K /2O37jFOiEDZhOpG558t9CTBg/Uwve+kb79w0bGZdo2Hz4TNfm6mssMnkVJ5+4cRXUAz KFXkGj0rw1U2xIHZR8tPezmO1kpfNBNy2AUEHZf6TtpBE0QJALqHWXQqAJ5DQA3yR7Nr eWbYFtSPUgzwcPjNp+WKOijCntYaLFKfRPj8mRLxMLyeT7AfEjPMXiMjiRhF32HDZvHt wocSLesjlOt+EDeKw65iEaKIfMO7Ia0AGa+Xg6650Q0i28hRoKrYeKhTL0ujHavo12U7 qgxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SKJkYPDD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si1112576ioj.96.2021.09.09.00.53.35; Thu, 09 Sep 2021 00:53:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SKJkYPDD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352755AbhIIHj2 (ORCPT + 99 others); Thu, 9 Sep 2021 03:39:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:39540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352693AbhIIHjW (ORCPT ); Thu, 9 Sep 2021 03:39:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EF7D3610C8; Thu, 9 Sep 2021 07:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631173093; bh=7lwbrqw7wj0cp85DjhXotE5F9UFIt/AUJn9Dp18hKEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SKJkYPDDVFO4QOfan1RYrCZO8uFJytvBPjRn4YNNgxASM2R/ajO/bIdzNJdHEPlIE G7GtJXzbCvqsAqdyw0gkKr2sKWwrkPWQXwv1YVTtYgXuEhKdxV+IQYrf88p6ZfJJt1 xx56WIsnXK0yT+17akXxtHE+3r6GM2ci888Eva3A= Date: Thu, 9 Sep 2021 08:39:51 +0200 From: Greg KH To: Prakash Sangappa Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, mingo@redhat.com Subject: Re: [RESEND RFC PATCH 1/3] Introduce per thread user-kernel shared structure Message-ID: References: <1631146225-13387-1-git-send-email-prakash.sangappa@oracle.com> <1631146225-13387-2-git-send-email-prakash.sangappa@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1631146225-13387-2-git-send-email-prakash.sangappa@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 05:10:23PM -0700, Prakash Sangappa wrote: > A structure per thread is allocated from a page that is shared mapped > between user space and kernel as means for faster communication. This will > facilitate sharing information, Ex: per thread stats shared between kernel > and user space, that can be read by applications without the need for > making frequent system calls in latency sensitive code path. > > A new system call is added, which will allocate the shared structure and > return its mapped user address. Multiple such structures will be allocated > on a page to accommodate requests from different threads of a multithreaded > process. Available space on a page is managed using a bitmap. When a thread > exits, the shared structure is freed and can get reused for another thread > that requests the shared structure. More pages will be allocated and used > as needed based on the number of threads requesting use of shared > structures. These pages are all freed when the process exits. > > Each of these shared structures are rounded to 128 bytes. Available space > in this structure can be used to accommodate additional per thread stats, > state etc as needed. In future, if more space beyond 128 bytes, is > needed, multiple such shared structures per thread could be allocated and > managed by the kernel. Although, space in shared structure for sharing any > kind of stats or state should be sparingly used. Therefore shared structure > layout is not exposed to user space. the system call will return the > mapped user address of a specific member or nested structure within the > shared structure corresponding to stats requested, This would allow future > enhancements/changes without breaking the API. > > Signed-off-by: Prakash Sangappa Where is the Documentation/ABI/ entries for this new user/kernel abi that you are creating and must maintain for the next 20+ years? thanks, greg k-h