Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5301641imb; Thu, 7 Mar 2019 12:23:07 -0800 (PST) X-Google-Smtp-Source: APXvYqygji4zkmgFY3aAEZ1WX4ZbC89y0x+XmlQ1/I27BoCPZYwAGHJSS6kT56uPx7WfH7+DSmlf X-Received: by 2002:a63:5961:: with SMTP id j33mr12850475pgm.174.1551990186916; Thu, 07 Mar 2019 12:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551990186; cv=none; d=google.com; s=arc-20160816; b=wQKm3ycHStglcu5XGN8tjbfer/AVPj1mpO1k0bjs88FP+LUQEvFtvSXTMr5MqhLbts Lc08p5T6u7IENJR5BT0ImVLz4Vzkd7afLSHYkpiJGm3iebogRGXfWc3O4NTBNsqOcgwL RfW/FTLMyyOLAFGPnLW60iXzMhbITMDOS28z3woxq8Emgt8uIHKE9j3X2V8WLzVoLSbU KcGucwSzO9vUu3AGhBA9TUNQ2drxNkANZ7yOuDrehDg+LA5KiQVB/gRFIf+EgXhPWknz 1ZCTq4GkgguIB5Rb3jXwKC5miCitJ7k6BeJ7eQoOO+46ISjMOur5QTz8tYQGqZ++WIvw UYRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iXRpGgrEShwyAzSridGBDxq56lrPqhtafP1GJSx3VIM=; b=GFW0eJ7hj9Hi2S3PaGamPtvAzmTxwfVwrqiX4HgRuCy1t9KCfikvtSEBf22wUxadjt OakzqmUpZ/KAE25/7FAh/rJEdUcARyAqVN5dP8nXPh03dYnXbfvKfY0oAy5Yx03BIjF+ qcwBTdpEqOtvlIdFEg6qrW94/dwu+A3n7kjGU4+gFNkI/aBvUycDvz0DntxKVU/hU778 2fBWoCsnjU3wrbrDPIW6XVSpBY239F5g9UpSxzDeYPcqROLixkN7mtXkcKofMVFcI3b6 BbZzDCJWncGkArpu9XyGyXzBZZcY16PyIrCSqMQh8Ucmh9+u8gnw3wQ4zKKQEGGFY6jf Qt/w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si4819366plk.108.2019.03.07.12.22.50; Thu, 07 Mar 2019 12:23:06 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbfCGUWA (ORCPT + 99 others); Thu, 7 Mar 2019 15:22:00 -0500 Received: from emh02.mail.saunalahti.fi ([62.142.5.108]:46896 "EHLO emh02.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbfCGUWA (ORCPT ); Thu, 7 Mar 2019 15:22:00 -0500 Received: from darkstar.musicnaut.iki.fi (85-76-81-108-nat.elisa-mobile.fi [85.76.81.108]) by emh02.mail.saunalahti.fi (Postfix) with ESMTP id E358220090; Thu, 7 Mar 2019 22:21:56 +0200 (EET) Date: Thu, 7 Mar 2019 22:21:56 +0200 From: Aaro Koskinen To: Alexandre Oliva Cc: "Maciej W. Rozycki" , Tom Li , James Hogan , Jiaxun Yang , Huacai Chen , Ralf Baechle , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] On the Current Troubles of Mainlining Loongson Platform Drivers Message-ID: <20190307202156.GB30189@darkstar.musicnaut.iki.fi> References: <20190208083038.GA1433@localhost.localdomain> <20190211125506.GA21280@localhost.localdomain> <20190211230614.GB22242@darkstar.musicnaut.iki.fi> <20190217235951.GA20700@darkstar.musicnaut.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Mar 07, 2019 at 03:41:01AM -0300, Alexandre Oliva wrote: > On Feb 17, 2019, "Maciej W. Rozycki" wrote: > > > Is there an MMIO completion barrier missing there somewhere by any chance > > causing an IRQ that has been handled already to be redelivered because an > > MMIO write meant to clear the IRQ at its origin at handler's completion > > has not reached its destination before interrupts have been reenabled in > > the issuing CPU? Just a thought. > > I've finally got a chance to bisect the IRQ14 (nobody cared) regression > on my yeeloong. It took me to MIPS: Enforce strong ordering for MMIO > accessors (commit 3d474dacae72ac0f28228b328cfa953b05484b7f). This is interesting, thanks for the research, but I'm afraid it doesn't seem to be the root cause. While your patch seems to help also on Mini-PC (only briefly tested with a dozen of reboots), there's still excessive amount of interrupts during the boot - I'm getting something like 50000-70000, while with the old IDE driver it's around 2500. ~ # cat /proc/irq/14/spurious count 57805 unhandled 57799 last_unhandled 4294673092 ms ~ # cat /proc/interrupts CPU0 2: 0 XT-PIC 2 cascade 3: 174 XT-PIC 3 ttyS0 5: 14653 XT-PIC 5 timer 11: 0 XT-PIC 11 ehci_hcd:usb1, ohci_hcd:usb2 14: 57805 XT-PIC 14 pata_amd 15: 0 XT-PIC 15 pata_amd 18: 0 MIPS 2 cascade 22: 0 MIPS 6 cascade ERR: 0 Could you check your /proc/interrupts counters after the boot with your change? A.