Received: by 10.223.164.202 with SMTP id h10csp1020104wrb; Tue, 7 Nov 2017 19:58:12 -0800 (PST) X-Google-Smtp-Source: ABhQp+SoaDRSyeBivScdNnBIsFijyQk0ZY7+gLZqjG1FHCs83g8ipr459j6QSg6tbTcrV9+JHoMb X-Received: by 10.101.93.140 with SMTP id f12mr957853pgt.60.1510113492872; Tue, 07 Nov 2017 19:58:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510113492; cv=none; d=google.com; s=arc-20160816; b=XNYh0R7VJYvxRNljZlMdviVGWNe0G0fBiALRzi+jgPIUuTlX75jVFEO9WHtQKoRUkM GgUmMA4olQnzJr8fyGnw2F6a69O3QWaTlD4ohaOZOuFliDNQ2huKCqfNoD1rGETiAbJ7 8+u45QMSzNbV0vCRvcYzTJFURi95fqk6HUH5DRuMEEaIxyTSqzTNLqt4zcJIJXr/OrFm d/R5SFnXbJ6snDTF+e9zsESDwBXBTAk4f7xMk2UV5wwQ0FoynFRrHglS57AqimTeR2Xh Q0Rj0FX3E19rprbJO+szJ6azVeHqpm/hREO7QZt7LVTGau8ogd3JhEAV+6Y/wKZ8YV0j ECnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=MTlVM6qFYTxXmtbk5/jOiKuMQYZMxa6gMiZaVh8na8o=; b=j2sUdfy3oaYepyU39e5LcqzG1X0LwRmf4/0vqHO2W2FdKQ4uAs4HtxdFp6Vv39Hzr2 xUm15vp22Nm/UvR+hMGWXE87qOcYRHyJLbOmy11r+vH8qODmT91T4TuopwGLY9Vwb+JS /VnKsQwsHHGMn8whqEWXsmDdSBCKC31ppw1Je4/dz/QpN9xMj75gKqWvHEWzG41FVRYa 0lkI5C91kJbF+ZnMxbffOsRFveHg0Z+8pRx/8I//8lxZaa+6UhAykF3VwIi+SzRu5VU6 wa5ExiJ8/MyVZonKM607ylog6SikGDUUiDQV11ilhpuqR63o2Y+KWQQyK7vwbnqH3oK4 b/kQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m16si2743536plk.258.2017.11.07.19.58.00; Tue, 07 Nov 2017 19:58:12 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbdKHCYS (ORCPT + 90 others); Tue, 7 Nov 2017 21:24:18 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35502 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbdKHCYO (ORCPT ); Tue, 7 Nov 2017 21:24:14 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA82NqLj053152 for ; Tue, 7 Nov 2017 21:24:13 -0500 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e3mq3b233-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 21:24:13 -0500 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 19:24:13 -0700 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 19:24:09 -0700 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA82O8t85112150; Tue, 7 Nov 2017 19:24:09 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D81536A041; Tue, 7 Nov 2017 19:24:08 -0700 (MST) Received: from suka-w540.usor.ibm.com (unknown [9.70.94.25]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 5C3CF6A048; Tue, 7 Nov 2017 19:24:08 -0700 (MST) From: Sukadev Bhattiprolu To: Michael Ellerman Cc: Benjamin Herrenschmidt , mikey@neuling.org, hbabu@us.ibm.com, nicholas.piggin@gmail.com, linuxppc-dev@ozlabs.org, Subject: [PATCH v3 06/18] powerpc/vas: Reduce polling interval for busy state Date: Tue, 7 Nov 2017 18:23:46 -0800 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510107838-15181-1-git-send-email-sukadev@linux.vnet.ibm.com> References: <1510107838-15181-1-git-send-email-sukadev@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17110802-0016-0000-0000-000007C5B17C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008029; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00942691; UDB=6.00475553; IPR=6.00722979; BA=6.00005677; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017903; XFM=3.00000015; UTC=2017-11-08 02:24:11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110802-0017-0000-0000-00003C2A38CF Message-Id: <1510107838-15181-7-git-send-email-sukadev@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-07_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711080027 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A VAS window is normally in "busy" state for only a short duration. Reduce the time we wait for the window to go to "not-busy" state to speed-up vas_win_close() a bit. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c index 95622a9..1422cdd 100644 --- a/arch/powerpc/platforms/powernv/vas-window.c +++ b/arch/powerpc/platforms/powernv/vas-window.c @@ -1060,21 +1060,23 @@ int vas_paste_crb(struct vas_window *txwin, int offset, bool re) } EXPORT_SYMBOL_GPL(vas_paste_crb); +/* + * Wait for the window to go to "not-busy" state. It should only take a + * short time to queue a CRB, so window should not be busy for too long. + * Trying 5ms intervals. + */ static void poll_window_busy_state(struct vas_window *window) { int busy; u64 val; retry: - /* - * Poll Window Busy flag - */ val = read_hvwc_reg(window, VREG(WIN_STATUS)); busy = GET_FIELD(VAS_WIN_BUSY, val); if (busy) { val = 0; set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(msecs_to_jiffies(5)); goto retry; } } -- 2.7.4 From 1584883228283445487@xxx Thu Nov 23 18:40:29 +0000 2017 X-GM-THRID: 1584868365849098675 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread