Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3117190imm; Fri, 20 Jul 2018 10:25:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdtg22sKaJE3lquaDg2MrNcAqCph6eQm1+QMsC2XXJYSClt9IEIoOX/GKwVCd0+zk2Y25PA X-Received: by 2002:a63:c00b:: with SMTP id h11-v6mr2806676pgg.279.1532107502532; Fri, 20 Jul 2018 10:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532107502; cv=none; d=google.com; s=arc-20160816; b=PkaC7ABr/mS19/GU7QpDRHCiL8rBHG2uqJKhxcORnmHIMj3q2TaclstrT9gwR/uMVY hy6hMorKlW5csnw7mOrFqLh7t28HwtUzXcOjD6iVhSso587IV4ce0+xoLeWggrquOWwK T70ptMUYwy3XQhFKxRnKKRXiHDnRogFIgx+0yU/pYKQDTM52VNl3O5IL0KWtqzApkuyi /lmUekVtd6gh6wt52qt0x4niaD8+HAJylI9rzACoci3QDeT/UJy3kuhvM0gt35D0Gfg3 Fn4VpDEIrB+PByigpdxHoT/oDtU/QtUzse1UmmBEId8MH5V794d6LmJPnCZ6bHmdLVPF 4dbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=EkGCWlEmxA4TuF2FArl7lh/UsAPHFE1sMByNTEFgu60=; b=I1y6dp4UlkFKgP0sMiRikxOmteW264dsNIt7yyMZCEgsi2lh/oolu01l4K7tJKJehL YyagxU2RdO3EEO+6r3tTfRIdN8yvR3XEc7LIZ/QEeYVePjNN32zQSKXAMCVvLXIq2/Ow Ff2E4HUtejxzVFbmbzO+S8PiwT0krwidAJI6BPVYoQjEk91qa/RAkkvmyVjvPVodmMRQ jRzYfn93FOHCtouQnVzSeR8+4VUz4AVmB4EFWKAmfNxk2aIHA5wVisYLGR2wxWJezMTP 6Byiv5sWUtVvsoGTXTPfNBHdpaK/0SrKuEazf7bPV8o6FBARgKr9wwCpkAsAZDfcNc4T wzKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si2021966ple.435.2018.07.20.10.24.46; Fri, 20 Jul 2018 10:25:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388034AbeGTSNZ (ORCPT + 99 others); Fri, 20 Jul 2018 14:13:25 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:37543 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731556AbeGTSNZ (ORCPT ); Fri, 20 Jul 2018 14:13:25 -0400 Received: from p4fea5a5a.dip0.t-ipconnect.de ([79.234.90.90] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fgZ8P-0008D2-0s; Fri, 20 Jul 2018 19:24:05 +0200 Date: Fri, 20 Jul 2018 19:24:00 +0200 (CEST) From: Thomas Gleixner To: Yury Norov cc: Frederic Weisbecker , Frederic Weisbecker , Ingo Molnar , "Goutham, Sunil" , Chris Metcalf , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nohz: don't kick non-idle CPUs in tick_nohz_full_kick_cpu() In-Reply-To: <20180719202200.GA17106@yury-thinkpad> Message-ID: References: <20180712181922.23073-1-ynorov@caviumnetworks.com> <20180716153109.GA29270@lerouge> <20180719202200.GA17106@yury-thinkpad> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Jul 2018, Yury Norov wrote: > While here. I just wonder, on my system IRQs are sent to nohz_full CPUs > at every incoming ssh connection. The trace is like this: > [ 206.835533] Call trace: > [ 206.848411] [] dump_stack+0x84/0xa8 > [ 206.853455] [] _task_isolation_remote+0x130/0x140 > [ 206.859714] [] irq_work_queue_on+0xcc/0xfc > [ 206.865365] [] tick_nohz_full_kick_cpu+0x88/0x94 > [ 206.871536] [] tick_nohz_dep_set_all+0x78/0xa8 > [ 206.877533] [] tick_nohz_dep_set_signal+0x28/0x34 > [ 206.883792] [] set_process_cpu_timer+0xd0/0x128 > [ 206.889876] [] update_rlimit_cpu+0x58/0x7c > [ 206.895528] [] selinux_bprm_committing_creds+0x180/0x1fc > [ 206.902394] [] security_bprm_committing_creds+0x40/0x5c > [ 206.909173] [] install_exec_creds+0x20/0x6c > [ 206.914911] [] load_elf_binary+0x368/0xbb8 > [ 206.920561] [] search_binary_handler+0xb8/0x224 > [ 206.926645] [] do_execveat_common+0x44c/0x5f0 > [ 206.932555] [] do_execve+0x38/0x44 > [ 206.937510] [] SyS_execve+0x34/0x44 > > I suspect that scp, ssh tunneling and similar network activities will source > ticks on nohz_full CPUs as well. On high-loaded server it may generate > significant interrupt traffic on nohz_full CPUs. Is it desirable behavior? Supsicions and desirable are not really technical interesting aspects. Just from looking at the stack trace it's obvious that there is a CPU TIME rlimit on that newly spawned sshd. That's nothing what the kernel imposes. That's what user space sets. Now the actual mechanism which does that, i.e. set_process_cpu_timer() ends up IPI'ing _ALL_ nohz full CPUs for no real good reason. In the exec path this is really pointless because the new process is not running yet and it is single threaded. So forcing a IPI to all cpus is pretty pointless. In fact the state of the task/process for which update_rlimit_cpu(() is called is known, so the IPI can really be either avoided completely or restricted to the CPUs on which this process can run or actually runs. Fredric? Thanks, tglx