Received: by 10.223.164.202 with SMTP id h10csp1023509wrb; Tue, 7 Nov 2017 20:02:49 -0800 (PST) X-Google-Smtp-Source: ABhQp+RpN0ogSehJOG0IsAxlc6ZZmYTiEfTcFxYL6hjz4cNgjVlpOaJFVVD+doUX56Rl6C9YrKEJ X-Received: by 10.98.158.211 with SMTP id f80mr1032392pfk.156.1510113769757; Tue, 07 Nov 2017 20:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510113769; cv=none; d=google.com; s=arc-20160816; b=RG6XN5zhIMtJ4vzECDCuAfiUKyqEpThPsLX2ZxNJiTtTDbv0+aFecg/N9FSCcPKERe C5ow60T2PdafFTB18SJrGahXqssATMm8NHpG1vBZzvq8FTMQy5D6qwv8f26mUI6WTo5x lHEcOt+hrEH9OJMTZj/Z6/9xM+HPZEgKzvt0v8ynqLFKShf+YQpRB3KXVmkFIww1TIZx 6o0s9G5tIHjEkJlwmcCn+/Hxnnt6qQwiUzgM+WURqMGhWdsmpX/6uhVU3xquGwnb3fSu rx665lBW1ILlkjEHpnV1y/vQOjklpvKiM50+wPEsMKZP7HHXgqeyM52pR/MP1smFrAiZ abHA== 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=FU4ZTgrKMJm8+K416vY+1j/u+UdA5zbmelq9o8hbck8=; b=Ki6tulD0rDpkttjj2fh25+IxsOExux400BjXFYV0qs2kVevFRb9GVMFzvM6nxR3jJT IJySHwsymS8rxemHXyVdIpIimD7S/AWFXEoJjABL2Pcx2qjL9VlvINP1646WA6ygopxn Luru6/DgN8OAb+xD3s28m/9xYGdEWxr5pf6k+FbIfRf4zvL0nB1f4JbBLe1amJROEqjR lGuuStaESnkscUmmtq5MXa5g6u/TjGllQ/HooMFflQsHwW+Zn4xcJNio6SRwlUK3u/zp RRT071U6CAabOEhKY2PmwnxOxEGHQr4t3Hpf/s9mwvNERwPYeqaH9PlrjOneeZNik86x VK8g== 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 v5si2893434pfl.215.2017.11.07.20.02.37; Tue, 07 Nov 2017 20:02:49 -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 S1754085AbdKHC14 (ORCPT + 90 others); Tue, 7 Nov 2017 21:27:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35190 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752641AbdKHCYL (ORCPT ); Tue, 7 Nov 2017 21:24:11 -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 vA82NqRJ053148 for ; Tue, 7 Nov 2017 21:24:10 -0500 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e3mq3b20n-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 21:24:10 -0500 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 19:24:09 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 19:24:06 -0700 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA82O5fO65536038; Tue, 7 Nov 2017 19:24:05 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C46D06A03B; Tue, 7 Nov 2017 19:24:05 -0700 (MST) Received: from suka-w540.usor.ibm.com (unknown [9.70.94.25]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 520DF6A03F; Tue, 7 Nov 2017 19:24:05 -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 04/18] powerpc/vas: Drop poll_window_cast_out(). Date: Tue, 7 Nov 2017 18:23:44 -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-8235-0000-0000-00000C878D61 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.00475552; 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:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110802-8236-0000-0000-00003E5AE27E Message-Id: <1510107838-15181-5-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 Polling for window cast out is listed in the spec, but turns out that it is not strictly necessary and slows down window close. Making it a stub for now. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-window.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c index 67ffc5d..8ab8a82 100644 --- a/arch/powerpc/platforms/powernv/vas-window.c +++ b/arch/powerpc/platforms/powernv/vas-window.c @@ -1079,25 +1079,25 @@ static void poll_window_busy_state(struct vas_window *window) } } +/* + * Have the hardware cast a window out of cache and wait for it to + * be completed. + * + * NOTE: It can take a relatively long time to cast the window context + * out of the cache. It is not strictly necessary to cast out if: + * + * - we clear the "Pin Window" bit (so hardware is free to evict) + * + * - we re-initialize the window context when it is reassigned. + * + * We do the former in vas_win_close() and latter in vas_win_open(). + * So, ignoring the cast-out for now. We can add it as needed. If + * casting out becomes necessary we should consider offloading the + * job to a worker thread, so the window close can proceed quickly. + */ static void poll_window_castout(struct vas_window *window) { - int cached; - u64 val; - - /* Cast window context out of the cache */ -retry: - val = read_hvwc_reg(window, VREG(WIN_CTX_CACHING_CTL)); - cached = GET_FIELD(VAS_WIN_CACHE_STATUS, val); - if (cached) { - val = 0ULL; - val = SET_FIELD(VAS_CASTOUT_REQ, val, 1); - val = SET_FIELD(VAS_PUSH_TO_MEM, val, 0); - write_hvwc_reg(window, VREG(WIN_CTX_CACHING_CTL), val); - - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ); - goto retry; - } + /* stub for now */ } /* -- 2.7.4 From 1583503451560616629@xxx Wed Nov 08 13:09:31 +0000 2017 X-GM-THRID: 1583503451560616629 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread