From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4B52C433DB for ; Thu, 11 Mar 2021 21:15:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70C39600CC for ; Thu, 11 Mar 2021 21:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231278AbhCKVOz (ORCPT ); Thu, 11 Mar 2021 16:14:55 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:56628 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbhCKVNU (ORCPT ); Thu, 11 Mar 2021 16:13:20 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lKScQ-00GbqU-U7; Thu, 11 Mar 2021 14:13:19 -0700 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=fess.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1lKScP-0000hL-OB; Thu, 11 Mar 2021 14:13:18 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Thomas Gleixner Cc: LKML , Oleg Nesterov , Sebastian Andrzej Siewior , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Matt Fleming References: <20210311132036.228542540@linutronix.de> Date: Thu, 11 Mar 2021 15:13:22 -0600 In-Reply-To: <20210311132036.228542540@linutronix.de> (Thomas Gleixner's message of "Thu, 11 Mar 2021 14:20:36 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1lKScP-0000hL-OB;;;mid=;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/iCrbfciiRJ2bJ7N3WrBBhNmRg72KlJrU= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [patch V2 0/3] signals: Allow caching one sigqueue object per task X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner writes: > This is a follow up to the initial submission which can be found here: > > https://lore.kernel.org/r/20210303142025.wbbt2nnr6dtgwjfi@linutronix.de > > Signal sending requires a kmem cache allocation at the sender side and the > receiver hands it back to the kmem cache when consuming the signal. > > This works pretty well even for realtime workloads except for the case when > the kmem cache allocation has to go into the slow path which is rare but > happens. > > Preempt-RT carries a patch which allows caching of one sigqueue object per > task. The object is not preallocated. It's cached when the task receives a > signal. The cache is freed when the task exits. I am probably skimming fast and missed your explanation but is there a reason the caching is per task (aka thread) and not per signal_struct (aka process)? My sense is most signal delivery is per process. Are realtime workloads that extensively use pthread_sigqueue? The ordinary sigqueue interface only allows targeting a process. Mostly I am just trying to get a sense of the workloads that are improved by this. Eric