From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 109E0C388F9 for ; Tue, 27 Oct 2020 20:38:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D65A321D41 for ; Tue, 27 Oct 2020 20:38:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1797652AbgJ0UiZ (ORCPT ); Tue, 27 Oct 2020 16:38:25 -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: kvm@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