Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp689405pxx; Wed, 28 Oct 2020 14:35:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhnUsJuIgFrVucbxd1UMTiH7Gw3dkf8nYge5uHcEuA4IzftzgtD1IPxVLoSn7fAwEok2c/ X-Received: by 2002:a50:f0c4:: with SMTP id a4mr885349edm.289.1603920920952; Wed, 28 Oct 2020 14:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603920920; cv=none; d=google.com; s=arc-20160816; b=D+7Euxe7Gm2leih9MQRVbBWI1Qs+zuyiyGD1sz1nmoN6I/QYOKhsagxNYmgWh8F0aQ ApuRD1Cz6eAB4RGL4vRk1BZWLt10bHw6C3ToTCD1nczpNOKgezUuwSX74IpwIGCfnJll 5jG9HPExz8+qvUhEm01os0XE8UVGup9QDYQhOOK1H5T28HO6O2jeNCAfnHOpK5iSQEi1 DYvA2TKdXfOwYfxzKw03VLKQFge6oBledYUeMCxwWCdhuDFOXfR471TAbhrTLHyBSC2I G7mHnz/rjBKQDwmfm+jnYnIvif+Nh3+Px+5L5r41cpE1VQGljbR1xe7bSDW+VGaMMEPW bAAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ne9wPu67VXbkoMQNbW2BfYgpzWCcoUBKbygmnz9S2zo=; b=LK0HZi11nM+mo44w8bsx7dbaO1w9jzxW+pvQEFJrIrqF7z9TC99rK786nXESl3e07/ NICleaw2QeaqgqegftGK/hMAzxoxzTKs05a9Z1o/C5MlIFhVw3GgLLPux83K1nu404Y/ zxHCiw5f3D3pFmwNUtY7MI6zAT2/ycHrfSCNzXzYu6F92fw2SFVC4iN0bOcKvS2i4WB5 HQYRUOg3eHgR2TfQ8oHC1mUUTSt+Z2Zn08/8yRMvIdgZ5qOLaybAhymQ4qrbVVqzLybN MKTK4N9wq9rTxLqcwtb2wfb2qBGAEjZHy9f0nzOx3Ge/mJUZOoEMVcsrGXoYPplkZvP3 2jYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si393928ejr.614.2020.10.28.14.34.58; Wed, 28 Oct 2020 14:35:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1815277AbgJ0Ui0 (ORCPT + 99 others); Tue, 27 Oct 2020 16:38:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:40416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1797528AbgJ0UiY (ORCPT ); Tue, 27 Oct 2020 16:38:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6C32AABD1; Tue, 27 Oct 2020 20:38:22 +0000 (UTC) Date: Tue, 27 Oct 2020 13:17:30 -0700 From: Davidlohr Bueso To: Sean Christopherson Cc: Ben Gardon , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Peter Shier , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long Subject: Re: [PATCH 3/3] sched: Add cond_resched_rwlock Message-ID: <20201027201730.kyusnssnrict75bh@linux-p48b.lan> References: <20201027164950.1057601-1-bgardon@google.com> <20201027164950.1057601-3-bgardon@google.com> <20201027175634.GI1021@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201027175634.GI1021@linux.intel.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Oct 2020, Sean Christopherson wrote: >On Tue, Oct 27, 2020 at 09:49:50AM -0700, Ben Gardon wrote: >> Rescheduling while holding a spin lock is essential for keeping long >> running kernel operations running smoothly. Add the facility to >> cond_resched rwlocks. Nit: I would start the paragraph with 'Safely rescheduling ...' While obvious when reading the code, 'Rescheduling while holding a spin lock' can throw the reader off. > >This adds two new exports and two new macros without any in-tree users, which >is generally frowned upon. You and I know these will be used by KVM's new >TDP MMU, but the non-KVM folks, and more importantly the maintainers of this >code, are undoubtedly going to ask "why". I.e. these patches probably belong >in the KVM series to switch to a rwlock for the TDP MMU. > >Regarding the code, it's all copy-pasted from the spinlock code and darn near >identical. It might be worth adding builder macros for these. Agreed, all three could be nicely consolidated. Otherwise this series looks sane, feel free to add my: Acked-by: Davidlohr Bueso