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=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 443D9C352A3 for ; Tue, 11 Feb 2020 23:31:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 07CD9206D6 for ; Tue, 11 Feb 2020 23:31:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZJ+Sucba" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07CD9206D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9D7D46B0370; Tue, 11 Feb 2020 18:31:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 962B06B0371; Tue, 11 Feb 2020 18:31:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8291B6B0372; Tue, 11 Feb 2020 18:31:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id 63E4F6B0370 for ; Tue, 11 Feb 2020 18:31:15 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1453B21F0 for ; Tue, 11 Feb 2020 23:31:15 +0000 (UTC) X-FDA: 76479444510.11.dime70_7f3bec1f27e2b X-HE-Tag: dime70_7f3bec1f27e2b X-Filterd-Recvd-Size: 3277 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Tue, 11 Feb 2020 23:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581463873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y+cFOa0w3KLlC+RAL3jce6oG/pms2+VbYregt8avzBA=; b=ZJ+SucbaSTnFv7Io3EkkBKURQOgmK61pvM/Dkigpi43LSlY2W/nbpT5v/jPI6d6AVts3gq ypuqogy5xgXOJgSbShfaf6pgObFfFU620d0qvQ/Wo9xyfIDuN8FYjBcp4c1nKZs1pCT768 SqoS5z8kQsRIka0zL7AeBW1vSBbuePs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-418-c4xth61jOHCBnJi1LdoZtQ-1; Tue, 11 Feb 2020 18:31:10 -0500 X-MC-Unique: c4xth61jOHCBnJi1LdoZtQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75561DB61; Tue, 11 Feb 2020 23:31:08 +0000 (UTC) Received: from llong.remote.csb (ovpn-124-198.rdu2.redhat.com [10.10.124.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5520F5DA7B; Tue, 11 Feb 2020 23:31:07 +0000 (UTC) Subject: Re: [PATCH 0/3] locking/mutex: Add mutex_timed_lock() to solve potential deadlock problems To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20200210204651.21674-1-longman@redhat.com> <20200211123138.GN14914@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: Date: Tue, 11 Feb 2020 18:31:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200211123138.GN14914@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/11/20 7:31 AM, Peter Zijlstra wrote: > On Mon, Feb 10, 2020 at 03:46:48PM -0500, Waiman Long wrote: >> An alternative solution proposed by this patchset is to add a new >> mutex_timed_lock() call that allows an additional timeout argument. This >> function will return an error code if timeout happens. The use of this >> new API will prevent deadlock from happening while allowing the task >> to wait a sufficient period of time before giving up. > We've always rejected timed_lock implementation because, as akpm has > already expressed, their need is disgusting. > That is fine. I will see if the lock order can be changed in a way to address the problem. Thanks, Longman