Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3524808imm; Wed, 5 Sep 2018 01:22:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZI3F3zwLCygnNDu7JxH1MnXbko/H02RYmHH+WlN4bsECekB/2MJ3J8HaF5my2svxa6HpIi X-Received: by 2002:a62:aa02:: with SMTP id e2-v6mr39055633pff.211.1536135776945; Wed, 05 Sep 2018 01:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536135776; cv=none; d=google.com; s=arc-20160816; b=AMTLVEvB0DmVu/G/NAKY+SqTPfghfkzbc95+iirdHTOFqO/beithQ7f8A8QhS3Ibl8 raBK3hq263DGSDfwMbYc+ft0vvnoZZOcopXCQXySA9L8JnMdRWjXJXC3silZfcSf3cgf 9eR6gR1rxRW4O8F1PPML0tq8Pyw5mLCJCsS7rMo1EL5ADro7PCi7nUG4/QxB9fOdiGd+ WmgYn3B+HQ7+dYK7rXLm1AIuw2vO+PfnvPLG9fFT0shG/EYRkcw8tdU82XPwvR6DVhsY lEJRVSNj2n9Ff10PuHVg72fjMHijAspVx+p2B6ycLd2ebm306FdcMIaXrx4Uuy2c+Rwv mW6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=8K1I8xc2w8AOJe7r3dRzbBGSdnCPfuIEXe71xRHHcnk=; b=A6Zw0hQRFD0yH+6UP8r+bsHr0da0o0y8dQIC0Qi6cVw9ejamslsVMpd4jQqE138Fs+ BWlZrqWo0QbIdOi+LYE2w9XnCWADBoll65olsv7qoaiYPwgy4x1igYw729my+9cNNF1T I/LhXd+2jXLoNZzmqoEVcyn3jgJ4TIMVHwn66IODsqKRWCtA7s9M3wYiqhFKef1b3oul uUJkRj8dkDGm9ZICHomb3TjPJ3i/zXZ5BI1C5p8c872mtozAbnQd7w5HjX49B7tYbTwU tfssfu/gQbs9AdPzqzOFwU6nXmmG0uCVLzaKm4DCsSzFyfsuTZlkIjtzx8ycCfNgtVY1 793A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=VulkXkyo; 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 cd4-v6si1422760plb.516.2018.09.05.01.22.42; Wed, 05 Sep 2018 01:22:56 -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; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=VulkXkyo; 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 S1727879AbeIEMuG (ORCPT + 99 others); Wed, 5 Sep 2018 08:50:06 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35146 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbeIEMuF (ORCPT ); Wed, 5 Sep 2018 08:50:05 -0400 Received: by mail-wm0-f66.google.com with SMTP id o18-v6so6771928wmc.0 for ; Wed, 05 Sep 2018 01:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8K1I8xc2w8AOJe7r3dRzbBGSdnCPfuIEXe71xRHHcnk=; b=VulkXkyon7b59NFZ9E11H0GO+W7Nz+DxfcMDb22y9q+AC8OStL9DjcUxxuIla90pWk ZcqXuWGOSA0NwPjJErtyeTcuj6UVptWTAduXZW0Vja82cKA63q8JJLV79+IVso+LrWDx Ij0H7zVG3XeNckCxnH3Ri7ZaYw4fN0iJxPq7nqH/UCHg266Oex2KIbZomYBm1FlNrFeO fHxzsNEL92cS8AmYQwer3/2f6sb3aaj/Fe8KmnIOGfr2iJhQIbriu0Llhg/5AO5uvioE KIDy5v00sfzwpN4MtbRHUg7rcHV46SW46/sec6/0fVAr3VKlR410wTDggl/Lkbyvb7M0 f8PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8K1I8xc2w8AOJe7r3dRzbBGSdnCPfuIEXe71xRHHcnk=; b=Lx5e34M+bQ50mSeH99hZoY3q9lwWTyRrn12WcFfZhg7Po5iIO/elCnK1GIi+Unljax i16jxnRQH05XEcx/6JTPGXOx4NTl7x5eGJcS3mbddmbqL8WQOLCYf77StaG1YkFCpiUc YXk2/sqXK/xVrM3e0DfV6RuyH/A/ri4iLDLtZfzCd228zkrIhZL4jVmY/6aKAwP9wSXc RieOKfwn1+06D4wdoiYBUFdlGIofHxoRk3OrZbERKVxLXIiVrRDZy761NnhDkPfNJ4eU Vikce4LjoPMqqJcsZviZFL8CZq3nuuHUJICqPnRMTKPBeh0ugUnd8kEo2dIUdUbJTU/M Xpfg== X-Gm-Message-State: APzg51C5yoKWzzAprjTRMs9ktXyhf9A/hZAX2obBr5z+2YaPjRAMY6dM DHgqgLOVHga+IwoDO3CV/bQAr4MpKKXcIYIneTK9Jw== X-Received: by 2002:a1c:3a08:: with SMTP id h8-v6mr10789736wma.126.1536135660716; Wed, 05 Sep 2018 01:21:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9dcb:0:0:0:0:0 with HTTP; Wed, 5 Sep 2018 01:21:00 -0700 (PDT) In-Reply-To: <20180904185826.GE25119@infradead.org> References: <20180904124514.6290-1-anup@brainfault.org> <20180904124514.6290-6-anup@brainfault.org> <20180904185826.GE25119@infradead.org> From: Anup Patel Date: Wed, 5 Sep 2018 13:51:00 +0530 Message-ID: Subject: Re: [RFC PATCH 5/5] clocksource: riscv_timer: Make timer interrupt as a per-CPU interrupt To: Christoph Hellwig Cc: Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Marc Zyngier , Atish Patra , linux-riscv@lists.infradead.org, "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 5, 2018 at 12:28 AM, Christoph Hellwig wrote: > On Tue, Sep 04, 2018 at 06:15:14PM +0530, Anup Patel wrote: >> Instead of directly calling RISC-V timer interrupt handler from >> RISC-V local interrupt conntroller driver, this patch implements >> RISC-V timer interrupt as a per-CPU interrupt using per-CPU APIs >> of Linux IRQ subsystem. > > And the point of that is? Except for introducing lots of pointless > code of course.. Instead of short-circuiting timer interrupt from low-level IRQ handler, we use Linux per-CPU IRQ handling for timer interrupt. Without this patch, output of "cat /proc/interrupts" looks as follows: CPU0 CPU1 CPU2 CPU3 8: 8 12 18 6 SiFive PLIC 8 virtio0 10: 9 11 3 5 SiFive PLIC 10 ttyS0 With this patchset, output of "cat /proc/interrupts" looks as follows: CPU0 CPU1 CPU2 CPU3 5: 995 1012 997 1015 RISC-V INTC 5 Edge riscv_timer 8: 23 6 10 7 SiFive PLIC 8 Edge virtio0 10: 9 10 5 4 SiFive PLIC 10 Edge ttyS0 Regards, Anup