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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30640C433EF for ; Wed, 29 Sep 2021 13:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 121D5613A6 for ; Wed, 29 Sep 2021 13:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344043AbhI2NH1 (ORCPT ); Wed, 29 Sep 2021 09:07:27 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:42948 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343954AbhI2NH0 (ORCPT ); Wed, 29 Sep 2021 09:07:26 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632920741; 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=S7fGf3JOCmLvS/sfHyNXBRWUbSUXhk8NJHd4u4NgqeY=; b=ME11AodDNH3YGMSmxoYRnu2SeziGDfhyIL/dqvE7iqcDk/inPzgf0xF79mHmPR5nG177tM MRyp2ZztIynNhdyJhqTe8ldYwdQPSVfrQvyHjeRv6d2oHmjQ+BenGOr9xOwC0FAeBQl2z/ Z04y99TV0a+A1Wqap3ykcnrsqXhm1w9Tqxd+SRU9SgDc+5jwO25VimC+JWzHToSyDGeTrW c6E2LXUmlwl2SdtIkRZaDFF3FNfd6pQ5JU+uaAbpoGzRaOTBxHm6jyMlUBQoPLC0Q/5wo9 1px49GmsjUDSyinBd+cx8fiDvBBZYTyeFWb8/JMXYkPXXhmcH/7iflNvj6QItQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632920741; 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=S7fGf3JOCmLvS/sfHyNXBRWUbSUXhk8NJHd4u4NgqeY=; b=0NsK69SjO7uGIgQqOvPGOxCwFtmdE80Ag9zV1BIwdUq08oY0Hek79i/Od991NG03wTtPZA m9ZdAGyGAN1YuiCw== To: Peter Zijlstra Cc: LKML , Ingo Molnar , Masami Hiramatsu , Sebastian Andrzej Siewior Subject: Re: [patch 5/5] sched: Move mmdrop to RCU on RT In-Reply-To: References: <20210928122339.502270600@linutronix.de> <20210928122411.648582026@linutronix.de> Date: Wed, 29 Sep 2021 15:05:41 +0200 Message-ID: <87ilyj8rbu.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29 2021 at 14:02, Peter Zijlstra wrote: > On Tue, Sep 28, 2021 at 02:24:32PM +0200, Thomas Gleixner wrote: >> +#ifdef CONFIG_PREEMPT_RT >> +/* >> + * RCU callback for delayed mm drop. Not strictly RCU, but call_rcu() is >> + * by far the least expensive way to do that. >> + */ >> +void __mmdrop_delayed(struct rcu_head *rhp) >> +{ >> + struct mm_struct *mm = container_of(rhp, struct mm_struct, delayed_drop); >> + >> + __mmdrop(mm); >> +} >> +#endif > > Would you mind terribly if I fold this into mm.h as a static inline ? > > The only risk that carries is that if mmdrop_sched() is called from > multiple translation units (it is not) we get multiple instances of this > function, but possibly even !LTO linkers can fix that for us. No preference here.