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=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 AF0A4C433B4 for ; Wed, 5 May 2021 16:20:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73AAC613B3 for ; Wed, 5 May 2021 16:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233995AbhEEQVu (ORCPT ); Wed, 5 May 2021 12:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233857AbhEEQVt (ORCPT ); Wed, 5 May 2021 12:21:49 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 453A9C061574 for ; Wed, 5 May 2021 09:20:51 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id b21so3208949ljf.11 for ; Wed, 05 May 2021 09:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q1Ws7hM1g3rNgVo1qWsRwG/a83biuh7qtkH5oZYDPSU=; b=OZ0sPHITT95pix7g1f4tFO1QvbWd0iotKP+cq6CWiQWL34gkkhfHldPGcumua4eEzy 1dmAGmAc88gWo0TyqBornHH+r5ZmjBm3SwOPeZoXlijBszxa34EOcQU8abehFvOcHxrW 9dRP1+b0FpMGKci3bfm9EpKePM6RfHMOPNNRs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q1Ws7hM1g3rNgVo1qWsRwG/a83biuh7qtkH5oZYDPSU=; b=FW+F7ab24/O57D9hQso4aihayazymHIaFuMAjf9irRUyFxv45z4UuKVP+5JdEpI3Do 3LhfEooknaFdmegw5WccMXb60A1hgnRBffChYKuLQptyVr2S2pRu9RDYxrO/1O7dKcQJ JZ8PYc3hfgtSs5F040yhA//0RpoY9bBeY6cXhD9u1NzgI8Fq7rwohN7/QMoumUTXxcdD DIc6X4NzMAmLAUx2sIFaZqQ/RuPLbDGuqhvWZIReRkvDVF6pJ/FO4+mEO2oR8LF6XaA0 JKH5L+/z9boY6g2+8zf0mxTKRnckdcFqTZuotB5kgRHLcxYUKp7CaOVrjJ0Rjqe3/r07 6XZw== X-Gm-Message-State: AOAM5314QcTYIJAsOJHjX/iWjb5STUeCXo+Tt8dAiWnZZYLuzHOxXQCD EwOr6CD8uZ4IoJIUCjyb0A6E2fYnTYjca7qE6klBlg== X-Google-Smtp-Source: ABdhPJwY7XL1YMMiuzL4xxfdLqpToW4DgoXwsuvb9sT2O/23Zox3v0QUIDcVcZsxwLlmLD/PUEix07h1Ubr1p9rkYuA= X-Received: by 2002:a2e:a373:: with SMTP id i19mr14169965ljn.49.1620231649796; Wed, 05 May 2021 09:20:49 -0700 (PDT) MIME-Version: 1.0 References: <20210422120459.447350175@infradead.org> <20210422123308.196692074@infradead.org> In-Reply-To: From: Don Hiatt Date: Wed, 5 May 2021 09:20:38 -0700 Message-ID: Subject: Re: [PATCH 04/19] sched: Prepare for Core-wide rq->lock To: Peter Zijlstra Cc: Josh Don , Aubrey Li , Joel Fernandes , "Hyser,Chris" , Ingo Molnar , Vincent Guittot , Valentin Schneider , Mel Gorman , Linux List Kernel Mailing , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 4, 2021 at 12:38 AM Peter Zijlstra wrote: > > On Thu, Apr 29, 2021 at 01:39:54PM -0700, Josh Don wrote: > > > > > +void double_rq_lock(struct rq *rq1, struct rq *rq2) > > > > +{ > > > > + lockdep_assert_irqs_disabled(); > > > > + > > > > + if (rq1->cpu > rq2->cpu) > > > > > > It's still a bit hard for me to digest this function, I guess using (rq->cpu) > > > can't guarantee the sequence of locking when coresched is enabled. > > > > > > - cpu1 and cpu7 shares lockA > > > - cpu2 and cpu8 shares lockB > > > > > > double_rq_lock(1,8) leads to lock(A) and lock(B) > > > double_rq_lock(7,2) leads to lock(B) and lock(A) > > Good one! Hi Peter, I've been running the same set-cookie tests on your latest repo for the last 24 hours and haven't had a single lockup. Thank you very much! don