Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3271743pxu; Tue, 8 Dec 2020 07:51:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAbu64xsTp0n0YrD9278vOaIQFQXCRte6wkmLJ+2Dunt8XPAzFeV4nyakX/VhcaGnGH0YK X-Received: by 2002:a17:906:bc9b:: with SMTP id lv27mr23210397ejb.505.1607442679029; Tue, 08 Dec 2020 07:51:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck15si10074527edb.37.2020.12.08.07.50.54; Tue, 08 Dec 2020 07:51:19 -0800 (PST) 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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=C0DZmHS3; arc=fail (signature failed); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730002AbgLHPre (ORCPT + 99 others); Tue, 8 Dec 2020 10:47:34 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:5340 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729665AbgLHPre (ORCPT ); Tue, 8 Dec 2020 10:47:34 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 08 Dec 2020 07:46:54 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 8 Dec 2020 15:46:53 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 8 Dec 2020 15:46:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ma1ZbKQfWW/uXrKeIrzKsxL9TbAMFck/w3GTFiFSmVfy20ZVqQV5rVKicEMxwlXV2+Nk59ofd6oDlCLfLK5FLfzAF9ladQqhmlSbshxNYH26hZHOPT90TBKVEWXaX2/6s7YRAUyLx2JQ0psxCsfM6jDCcalHk5w2JnabuCIuFvowA9qMVmeOOxFXK/Vgdo+2A5OGwo6gHZpRd2LTKHsDuPLYHKIeJUDHKOcz9kn22LkbKuSx2rBhbryf416I0JuZKw0icmjQ4rGJGuN0HSff1/RdzZrZVlrDnYX4CUYu5nWHCC8GvDujaN0zqqM2nzTNycJr9j6cFV/83MXIjAwTFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kB0E+4KI/ryyAooQ9G7OLFeq1gC6efMUMVPhm6bzZwY=; b=IMBKcH6cKwe3Rfh4GhEnVQg2VSx5YM5qBaEHtQm+IE/jjDbZ7GJ1gtZT6zGbmbVMG22jzrjx2gnMNdnWTPJBNTojvMLEQo3xkEzcqlEHraD9kvCt336fFEXtmVN3sHcLdOgVt2oGJgPFtYgKDPjrqFX5M0UJVQyivlVJZITiaT6qUyOR7ctb0HBosNdiEOQm7zsCCbciYmqh5GdIp+3Ofq78IkZjaqcc47sV7/q1jfPlKyF/leK6HrELSS62Plsf2DP0Mn0pok9FaxKC1GVwsHzrruumlqZuJW+NbNx7EHMK8NL5Suqct3ucNcH0Tv0eg5duTNru+FYQF9gae84VAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) by DM6PR12MB3305.namprd12.prod.outlook.com (2603:10b6:5:189::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.23; Tue, 8 Dec 2020 15:46:52 +0000 Received: from DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1ce9:3434:90fe:3433]) by DM6PR12MB3834.namprd12.prod.outlook.com ([fe80::1ce9:3434:90fe:3433%3]) with mapi id 15.20.3632.023; Tue, 8 Dec 2020 15:46:52 +0000 Date: Tue, 8 Dec 2020 11:46:51 -0400 From: Jason Gunthorpe To: "Ahmed S. Darwish" CC: Peter Zijlstra , Ingo Molnar , Will Deacon , Linus Torvalds , Thomas Gleixner , "Paul E. McKenney" , Steven Rostedt , Jonathan Corbet , John Hubbard , LKML , "Sebastian A. Siewior" Subject: Re: [PATCH -tip v1 3/3] seqlock: kernel-doc: Specify when preemption is automatically altered Message-ID: <20201208154651.GN552508@nvidia.com> References: <20201206162143.14387-1-a.darwish@linutronix.de> <20201206162143.14387-4-a.darwish@linutronix.de> <20201207204316.GF552508@nvidia.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MN2PR12CA0018.namprd12.prod.outlook.com (2603:10b6:208:a8::31) To DM6PR12MB3834.namprd12.prod.outlook.com (2603:10b6:5:14a::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mlx.ziepe.ca (142.162.115.133) by MN2PR12CA0018.namprd12.prod.outlook.com (2603:10b6:208:a8::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Tue, 8 Dec 2020 15:46:52 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kmfCV-007wQJ-3Z; Tue, 08 Dec 2020 11:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1607442414; bh=kB0E+4KI/ryyAooQ9G7OLFeq1gC6efMUMVPhm6bzZwY=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Date: From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:X-ClientProxiedBy:MIME-Version: X-MS-Exchange-MessageSentRepresentingType; b=C0DZmHS39Ekkdw3HN0WbyxsTt47hiFUezl98OfKBnS5VOvLmPjzD2tbhUEuVVCHX6 1jMAwBuegpiS13fM12PLxxTpVimewj1sk6q45EiTP/+lT86Co8Lt98aalEuIJfBPTA Dxwh8eYVWq7aJJM7pJ2sMY4Sgg7FyPdtJUT1wlv/EkkjDwNga7yzz1BZx0WwzTeZxL YjAtiJt/sMbRZPdYHF2DrKVEypV2JoVSp/E8rKkMPHU3G5pqrbrB8e2Gul4DO4Uucx 2WBErXsdCYTalNyfv7bPcNevoC4VBA9CafjwpTbMpZozd11sefFkjHTh0QJWoJAGnW iNTtBDQmFpM9A== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2020 at 03:31:39PM +0100, Ahmed S. Darwish wrote: > Hi Jason, > > On Mon, Dec 07, 2020 at 04:43:16PM -0400, Jason Gunthorpe wrote: > ... > > > > The thing that was confusing is if it was appropriate to use a > > seqcount in case where write side preemption was not disabled - which > > is safe only if the read side doesn't spin. > > > > No, that's not correct. Well, that is where I started from.. seqcount in normal pre-emption disabled cases was well understood, I needed a no-pre-emption disable case. > For developers who're advanced enough to know the difference, they don't > need the kernel-doc anyway. And that's why I've kindly asked to add the > following to your mm/ patch (which you did, thanks): That is probably over stating things quite a lot. If there are valid locking patterns then I think we should document them, otherwise people simply do something crazy and get it wrong. It was not entirely easy to figure out why preemption disable is necessary here, though in hindsight it is obvious.. Jason