Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1327218yba; Tue, 2 Apr 2019 06:57:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHf4Z5Bz+ZaGQ12+os/Gk7ua/YSxUy4IgCb5rtAAgV16ZPv4F1BfmVcZDBcnyAx4oipaf3 X-Received: by 2002:a62:12c8:: with SMTP id 69mr69929664pfs.184.1554213464110; Tue, 02 Apr 2019 06:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554213464; cv=none; d=google.com; s=arc-20160816; b=WGih2HVz5XmERNYNtZJ/lYpHPh4XeVB7Lkv6aE7ROa5HzMApTGUc6VQ/JrAOpdI0PM /S2P+J8MpOhLl9gYebRWFBdX1hD+/sDiCQk43B5NTdlHl9V22HIRM5F426F7GeISmUhq 2ZKG/3uix8UwTR1+hvXMfRIcHDMDeD30hQudCEFmyueSl5s2z7ue1I551KSCN7+A7VBu GIl0tpPn90NJWrd1pb8D7m8dLEklPM6UPZEtHachL+4U34svGYsUs05s2gM+uwJlQyA2 hWeGB2snWRAlEexm5VO0zRqyEe9ZTfHnsmMz8wi5VPjFCdQ9cU6MyFPcFjWonKSh6SPf bBbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=eyIe8u6Gr9VYhYSE410erruSd8jDIrKaP8cUiBOsxSQ=; b=UT2/2VCBOFZSPXPxRwNR5hovCvylJOqHqOLBLWPAXiFwXyjY6QOlL1anOAKWv3S+0M rhphiMUfb8rDqsQ0aDoIsjk74smNJUJlkNizB77cFcRRxXKxaPbVtg3gWkq2dvcezGcm G9W8amEcgrKQx3VE0MwJFR35AU7E+R2psbzp6hcdUXJN02U07/9N76rl94IMSwAEU1c3 1XUZIkPjI71uPUNZaWMb9hNChXEHuCJ27GeJIco+hDxPN/adVdVKoWcm3m9MOS+t3DrE GwEOE6wjezNdg7qQRynRt/SXnAi3D2GHA0XJxTEBpynEjbMnWAgD/IMbviuZUmFWClCo Zt/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=km5FYIM2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x131si11290541pgx.73.2019.04.02.06.57.28; Tue, 02 Apr 2019 06:57:44 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=km5FYIM2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732139AbfDBN4U (ORCPT + 99 others); Tue, 2 Apr 2019 09:56:20 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:38575 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731186AbfDBN4U (ORCPT ); Tue, 2 Apr 2019 09:56:20 -0400 Received: by mail-io1-f67.google.com with SMTP id v4so10964438ioj.5; Tue, 02 Apr 2019 06:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eyIe8u6Gr9VYhYSE410erruSd8jDIrKaP8cUiBOsxSQ=; b=km5FYIM27ScmBGI8oKFEVytngyHRxu4jyDItUvdOhornWRoka5QMu9V8eEaT97vSeI VhSbsmvjbSNd8pRBsc0SC1vADlXEJA03fwnydA+JB1DH9/dkxd8eWy60iCvwjxJh2wZj 56DcVz5ZE2X01/76Zm+DqnfoHONW6hTGkcGjPqvrSGeq0n3KPEfVAF5sMxOYVX8Usuqi 1XKwsJkgmzjFwFuhjz5OIIXvUjTF96x17F6Ey9G8tgANFrUf0SCSsWYqTBLpTpcIVQM8 26nheNiJlG5hj3cA0RN2LJ1xuEzZc4fBM4wd26loHSUxaa7STv7RC9Ea+MrBNIJZt+5s BQeA== 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=eyIe8u6Gr9VYhYSE410erruSd8jDIrKaP8cUiBOsxSQ=; b=HUnGFxdat3OEoY4zn9y/xBYF0Nf1W2N8kVGeF95eFPTkfmSx4AP+LaiWw456f5hJmS vz4yK4o+b+WfGBsoZBHdDtxdCzQ58+4AKUnQ2llCnV+d84079//alQ8suMFgJKgOPP7J C9DvPn+x8rsTYgPB/o4PuLDn32pzYCCWInoHyLCWxVwgU/acGm4DPleds0OKYleBesdq Ev5pVZeTp6qpGLrKMCpKgNsyAyL/um4SlKPBFJqYW5H5CmHzDtg54rwxtj+Tso0IymJg tTv6GPPNWDUQYuJ4EeOIQptej7zeDiRQGStab9QWOJuRnHwasMwidq5ela8CaCfrLo9M ScpA== X-Gm-Message-State: APjAAAVP8vuhCRWRLvmi3UkLvwKdaaLG+xsIFtLnxkx5i5TfDz9P+BFa LidwSOV3y1z2nBzfKYgpJUmNeaGTe46GVOt0514= X-Received: by 2002:a6b:8d87:: with SMTP id p129mr48072633iod.10.1554213379755; Tue, 02 Apr 2019 06:56:19 -0700 (PDT) MIME-Version: 1.0 References: <20190402105006.48f93e53@canb.auug.org.au> <20190402112656.GE22763@bombadil.infradead.org> In-Reply-To: <20190402112656.GE22763@bombadil.infradead.org> From: Qiang Yu Date: Tue, 2 Apr 2019 21:56:08 +0800 Message-ID: Subject: Re: linux-next: build failure after merge of the drm-misc tree To: Matthew Wilcox Cc: Stephen Rothwell , Daniel Vetter , Intel Graphics , DRI , Linux Next Mailing List , Linux Kernel Mailing List , Eric Anholt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 2, 2019 at 7:26 PM Matthew Wilcox wrote: > > On Tue, Apr 02, 2019 at 01:55:03PM +0800, Qiang Yu wrote: > > Thanks, patch is: > > Reviewed-by: Qiang Yu > > This looks like a fairly naive conversion from the old IDR API to the > XArray API. You should be able to remove mgr->lock entirely, relying on > the xa_lock for synchronising free and get. I'm afraid the a little complex free path may involve some might sleep functions so use a mutex lock instead of spinlock. > If you think it's worth it, > you could even use kfree_rcu() to free the ctx and kref_get_unless_zero() > and then your get path would be lock-free. I can take a look this way, thanks.