Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1540162pxf; Fri, 12 Mar 2021 12:04:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKfPn8nuF/rdf3Ixbn/svDf0TRsDZTzbxE195QKgR6kVZlH8MOqi49uKaX36Ed2nQ9op8l X-Received: by 2002:a17:906:130c:: with SMTP id w12mr10398640ejb.253.1615579440941; Fri, 12 Mar 2021 12:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615579440; cv=none; d=google.com; s=arc-20160816; b=yPpsUSDezQOZeHicnxCkm5IkeaKccVxvJ4FZQUwa2YB5Klue4/lZ36E09fMqpUcOaB DaWdt3Y2dHY9hUtwcT7eE1Bg3tw3sRTb3ETA/10mK3qnX0tLFkngUo90+D3iCYbQ+eMH K23xFuJPSdsWuv8lIMnDssLw9UTspPY5NnmED2pVsyP1xYZbNzehoIwchHxJTn2av4mW RYPy7FBy1xbuqYAK2nISqJYFAoknaYLuZGH6PTAtYtHcXlho77LicOuGLR0mMq+HtkvF boaJdMc4Ze2/xoI7JnChy591MnY6OzZdpRVIxy/NtgTusMbApCpeuQZA/FIuRdonaPsQ ++gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=zZTUex9iUmioxRdB0BZBO5EmH81b4hMASMPDorRL4KI=; b=Td5NK3dHKJNQSxNChNYDl9kNeW6IDpY2W+sqDSOrZgScAmoGLLrTcDcVu2GnQ8Sic2 SARBqxb3R5rkvrjih/kA8v2ICJfhEHl7O4pOz1RgIXyTjMxPfmCrsCDl+VPSRaNB3Hds jK6B4IazQi2xX9d1KUPIALDOotI6daAe2uokf6CNcrifRlebIQh5avW1siwnQsQS56AA LjaTgMrSLvUN7X5k1Tt+/4mQ6pV3f3boAocyqLdYRTLYZVjogzYJYXIARVF2I8Z6FxVM Iw8EIUqPWNfigCV4hy/+OSEhrYXRpGx26REwm5qwwKz1nPJtxoyIO24ZIQ8BtbfsEQLI bSuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ojXNawhB; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si5136976ejx.329.2021.03.12.12.03.38; Fri, 12 Mar 2021 12:04:00 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=ojXNawhB; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234524AbhCLUCi (ORCPT + 99 others); Fri, 12 Mar 2021 15:02:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234523AbhCLUCS (ORCPT ); Fri, 12 Mar 2021 15:02:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34D2EC061574 for ; Fri, 12 Mar 2021 12:02:18 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1615579336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zZTUex9iUmioxRdB0BZBO5EmH81b4hMASMPDorRL4KI=; b=ojXNawhBP6s1C5bIiHUfrFe/W1mOt4ne0bpnE44RFVmJsmG/2+qlOaKEcRCZ7ySrd/Ypv7 DSyMtPSM/cFT0sDtOgmdp+TmH0dBw3jU6US3+l6i5FFLOmit7lmzXsFqUp/5W3WinMuQNl 9mLFmWraUEwVVGJtsshfhWotUUZ/FmnRKfVPaZKuwQoLTj/NUEl7EQ7qM9XRFblPtXi/2e ZY5FMQ27TMODgZY3e9YrZ0lVhaXVG8EVN5YbAym7EOOLL5DAyk0+MgOg4duw/bEDpFiwsE ZIzfsOr1wUmYhrceJa196C025zwD9+IvLpTSjMEBoo2FrcOUKxFolG6hlgZUIw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1615579336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zZTUex9iUmioxRdB0BZBO5EmH81b4hMASMPDorRL4KI=; b=cRoDJO70d05WfKV0flErSBYsTLb5MSd7czY4OgPXUegAI1nWfhp9omdK3GtZ2oXkWevRYG bV3H+hjlW/nwjdDQ== To: "Eric W. Biederman" 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 Subject: Re: [patch V2 0/3] signals: Allow caching one sigqueue object per task In-Reply-To: References: <20210311132036.228542540@linutronix.de> Date: Fri, 12 Mar 2021 21:02:16 +0100 Message-ID: <877dmc2l9z.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11 2021 at 15:13, Eric W. Biederman wrote: > 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. Unfortunately they use both. The majority is probably process based. Thanks, tglx