Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp417697imm; Wed, 26 Sep 2018 00:36:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV62kVd2dDrqe7guCZkMPtqbnnvb1n+N+fXMQYrOWbyErMoAM5FhK9Q9HhOsSndoY/9IiMfy3 X-Received: by 2002:a17:902:1681:: with SMTP id h1-v6mr4705072plh.262.1537947363842; Wed, 26 Sep 2018 00:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537947363; cv=none; d=google.com; s=arc-20160816; b=Bz3VfSV70P1uuOBbZ8nqK5InFv8anpjL+/1b51E2g5CMFKnyllfsleZ80tQW9ZM8IJ r1DR6F68oIaWgMCTOptk2zkHoRksl9oM4x08tbYlgK+KUMcpKlKJTgxKLJ1SYP0v7WH9 Fi3SOv/xy7ZKkAlbRYbPVvGy4giDypbtXZsR5nY3ollXGgaTLAAhr3Cz/ECyW9fXt1+C d+nuOoQkR40Y07H9JRgxHIVbXCoDfzQKDOtb0bBJZ0svrHtXAcFTyUHDJeBI3RoDYy4J +BERE98X9Hcriw1K4di0RhlNWGoZBPwQRjuiwxOlaRW3/rFpFEiQ0UXtKsml25P6Jd2L 7gOQ== 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:dkim-signature; bh=oafizKIcN4uSLdzDZamEnbzJjc6XZNuy5z9AD4S5UuA=; b=mHMMcHlWklmi4URi91MBWibq8kt5dXRq4OAO5rtvAaUFsJYRKuCRUcju0OsxzT98y9 1wk3omZppM4JZdKeEr2zV8aKVvFKV7Oaed+Ld7T78kML0Ryf6mScUAPsOHCAO3bQ9Q4j fwmo9YTBrOzC2wmrzBDM3F1/5UDGCL7dxzGWxdIAj9F2ALp38ipCDybV+j6H6T1UkaSZ wjOUMBeOURajW3n+A5OciNUXJ0RCFDyDGsr5hcbmO8XKE403Rq1HsIlOkEq5cxPm06vJ WVymuuR4+Pn/zeOqgS0vNT/iwPhvo6Lkn8GZcMmKQhuGvfZIM1OqMmePSyXW9JPtzIvY 31wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ONGgO6TL; 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 l12-v6si4732832plc.332.2018.09.26.00.35.48; Wed, 26 Sep 2018 00:36:03 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ONGgO6TL; 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 S1727187AbeIZNqv (ORCPT + 99 others); Wed, 26 Sep 2018 09:46:51 -0400 Received: from merlin.infradead.org ([205.233.59.134]:43134 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbeIZNqv (ORCPT ); Wed, 26 Sep 2018 09:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oafizKIcN4uSLdzDZamEnbzJjc6XZNuy5z9AD4S5UuA=; b=ONGgO6TLdfpYT9s+2eyd4Z6Y3 TbY4QABIYbeybROx5pY63EOMBMQyuHv+JW0GtTwp2vCyPksGuEClVJArfb45uGqhBEvxEVz0LLgia TeP48uq9yCXrXQdmNctb+CE9J/mSlFanY7IujO8uakAOgSzRnTgdJVkJh2gpzm8KzK/0Lj6t1aujg JOBNdvDUvvBhxPDRSLhVeDUOkLKKpiNdb2cQXqMh/DAkVszPeMhzjruw687Iysw5rppIhP9t4UiYX OWm1ewzJ3hljcQkA/A8HV7betkQy7+MBoawixhkpnqsMPBeXEyjCR7r/RbmiSw5Sx+QWfeVcuYs30 YUkBT2KjQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g54L8-0006El-D7; Wed, 26 Sep 2018 07:34:50 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 50D252029B098; Wed, 26 Sep 2018 09:34:26 +0200 (CEST) Date: Wed, 26 Sep 2018 09:34:26 +0200 From: Peter Zijlstra To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Daniel Wagner , Will Deacon , x86@kernel.org, Linus Torvalds , "H. Peter Anvin" , Boqun Feng , "Paul E. McKenney" Subject: Re: [Problem] Cache line starvation Message-ID: <20180926073426.GA31905@hirez.programming.kicks-ass.net> References: <20180921120226.6xjgr4oiho22ex75@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180921120226.6xjgr4oiho22ex75@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 21, 2018 at 02:02:26PM +0200, Sebastian Andrzej Siewior wrote: > Instrumentation show always the picture: > > CPU0 CPU1 > => do_syscall_64 => do_syscall_64 > => SyS_ptrace => syscall_slow_exit_work > => ptrace_check_attach => ptrace_do_notify / rt_read_unlock > => wait_task_inactive rt_spin_lock_slowunlock() > -> while task_running() __rt_mutex_unlock_common() > / check_task_state() mark_wakeup_next_waiter() > | raw_spin_lock_irq(&p->pi_lock); raw_spin_lock(¤t->pi_lock); > | . . > | raw_spin_unlock_irq(&p->pi_lock); . > \ cpu_relax() . > - . > *IRQ* > > In the error case we observe that the while() loop is repeated more than > 5000 times which indicates that the pi_lock can be acquired. CPU1 on the > other side does not make progress waiting for the same lock with interrupts > disabled. I've tried really hard to reproduce this in userspace, but so far have not had any luck. Looks to be a real tricky thing to make happen.