Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp351695imm; Sat, 14 Jul 2018 02:04:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc58vtNBPZXXLna7LY0wJ3SZGjI1GDegelMTnyzNP8m3YzIibDCM3g//nL0Gtj4ePI/6JWn X-Received: by 2002:a17:902:f83:: with SMTP id 3-v6mr9382167plz.282.1531559058642; Sat, 14 Jul 2018 02:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531559058; cv=none; d=google.com; s=arc-20160816; b=nFAEmZ7++1BVcuIK1rFmOSl4s9WjaZjdM+UU/xAQSoNzSEo/isoE7iwA6HLFJy9oGg phunWhkDNoBQ8VYID4592DjZzHYzuNaTQw/D7avrIeVtZVPnzwuuGkyB8V/dXOWce+um RnZPM0L2feSr9RBb0sjnOMoYV+Nrh0sod19pDJIn57Bm3FPnoLodfPZBH53vSE7HLsQR 7rBVHHbo2xjaor27u5kccKhzX3pS3jTl5uULuy35QVpZayNQs1olCXHXuU3IjFMr/tiD CCILdlKRNbn1BJCuSGAvJWzj7MsRZbjq1iNHs7ZRlIenGqzDDumGJlGz8Qhc+3ZO4tac sSGw== 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:arc-authentication-results; bh=DjX+vA0IobqjWniEWexVFNFhaNudjWnwNFHbmpTAbLY=; b=TQndiRXHpcP74uZ25EDCwEChlFBIuQ2FnCQviPi67PygV6OIJbRY8Mqcjy9d7sJxe4 e4Xx4dS6o4nnwWFoo0pV4/OPhVkM/c2u2ZjyoRYxIlbgbkQKj8X02aytMPLVnvhfd81L V/GdDkJLQ3Ow7mydBAF3xnPCNHRvLadT23JviMDoHEq9IQzD1zvG7EhJ2uHj7ULtseLU ocf8oyzehP2FzvFzFC4J+IsLVcAcGz7aMHKx4ELTqZI8lsZrdpGprtE1sS81q3o55R11 6OZ2S+U90VjdDYGqmWhsiYvVr8VfD+vGRwhRULKuqf+ioxsMp8U7Uh/oxCohCxRVe13F OIVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qX5TwQU+; 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 j1-v6si6207969pll.493.2018.07.14.02.03.50; Sat, 14 Jul 2018 02:04:18 -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=bombadil.20170209 header.b=qX5TwQU+; 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 S1726863AbeGNJVS (ORCPT + 99 others); Sat, 14 Jul 2018 05:21:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46570 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbeGNJVR (ORCPT ); Sat, 14 Jul 2018 05:21:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=DjX+vA0IobqjWniEWexVFNFhaNudjWnwNFHbmpTAbLY=; b=qX5TwQU+PVNWBKxA80Ffz56yc GZYlxBHBVHTxiiyMFbEJHKKEkuxW31ZTNyvkfD1HF9Cd7Ukct6YTCnVoMFymNZ+R9euH8mb2pT0PR rvZuraM50urQQtpxiRHr3cfkmgfBx73oISZHijxnuIFWDP7Fhc7eMZd7KwDpszO/vy7dynXux0ULR HhK3+5UoEzTVE+tj+ucFlYUeVm46CRIF+oi/TpXNwCaOcklovHKdvTCluWOB/mJqe+U94f3eWO8S9 pxrwRWQX9mL+16zXaiGPoNTEpwNPVHo8gVCSUH0rC7SUTC71Q8fr2ovN6EMvOShtg+Iy4Md1E1Ijm V35QtwTXQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1feGRy-0002DN-U4; Sat, 14 Jul 2018 09:02:47 +0000 Received: by worktop (Postfix, from userid 1000) id CD22D6E093E; Sat, 14 Jul 2018 11:02:44 +0200 (CEST) Date: Sat, 14 Jul 2018 11:02:44 +0200 From: Peter Zijlstra To: Johannes Weiner Cc: Ingo Molnar , Andrew Morton , Linus Torvalds , Tejun Heo , Suren Baghdasaryan , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 08/10] psi: pressure stall information for CPU, memory, and IO Message-ID: <20180714090244.GC4920@worktop.programming.kicks-ass.net> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-9-hannes@cmpxchg.org> <20180713092153.GU2494@hirez.programming.kicks-ass.net> <20180713161756.GA21168@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180713161756.GA21168@cmpxchg.org> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 13, 2018 at 12:17:56PM -0400, Johannes Weiner wrote: > On Fri, Jul 13, 2018 at 11:21:53AM +0200, Peter Zijlstra wrote: > > On Thu, Jul 12, 2018 at 01:29:40PM -0400, Johannes Weiner wrote: > > > +static inline void psi_ttwu_dequeue(struct task_struct *p) > > > +{ > > > + if (psi_disabled) > > > + return; > > > + /* > > > + * Is the task being migrated during a wakeup? Make sure to > > > + * deregister its sleep-persistent psi states from the old > > > + * queue, and let psi_enqueue() know it has to requeue. > > > + */ > > > + if (unlikely(p->in_iowait || (p->flags & PF_MEMSTALL))) { > > > + struct rq_flags rf; > > > + struct rq *rq; > > > + int clear = 0; > > > + > > > + if (p->in_iowait) > > > + clear |= TSK_IOWAIT; > > > + if (p->flags & PF_MEMSTALL) > > > + clear |= TSK_MEMSTALL; > > > + > > > + rq = __task_rq_lock(p, &rf); > > > + update_rq_clock(rq); > > > + psi_task_change(p, rq_clock(rq), clear, 0); > > > + p->sched_psi_wake_requeue = 1; > > > + __task_rq_unlock(rq, &rf); > > > + } > > > +} > > > > Still NAK, what happened to this here: > That's my thought process, anyway. I'd be more than happy to make this > more lightweight, but I don't see a way to do it without losing > significant functional precision. I think you're going to have to. We put a lot of effort into not taking the old rq->lock on remote wakeups and got a significant performance benefit from that. You just utterly destroyed that for workloads with a high number of iowait wakeups.