Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp316262ybm; Tue, 26 May 2020 18:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAxPlKQ305zhNs0Q6udcOdGqRUGE+o5J4GfYe+gAIhpoIRLvtbW5iJQ+mvZSb3YP2N9Tvr X-Received: by 2002:aa7:ca49:: with SMTP id j9mr22985663edt.186.1590541329344; Tue, 26 May 2020 18:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590541329; cv=none; d=google.com; s=arc-20160816; b=wOcF/bkNtepWhgXVGUxGVdpA3kc5LL6au5/Mu3etrK69mC1AJ9udF6IlEjtjitJzUJ jDo6Lbe6u2oMI+5h/cK9MoESdrzedckyhc30SyAA626q0XOo3bL7c9PMuSTOUfIh6ar6 ePgytIfxmrngXqdNUu1YgmBtDrFqFBYZKWS7vI4YavHtdJSWbCuVBEfJAfTFkioxBmDE o8BPpwOg4pUhVeX1ornieswGPrUxzIEIW0gNwSlq0bHQpJwZovmUcxAR5bpZcqPbqjYy 0ii8SrDCERzNmwBPho40QGxLeYCoEYUbrWU8wouW/IePG3pbqzsUj4pRI87mBASStPZ9 qV4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nl/uXXKU7gTdY5ohqQbCJW8fZVN8yq+KGlncMZ1Utts=; b=pOnAzCLBhkqOexYRY6Vuq1vPy+FU2enlu6bZ6umarn1b9N7qXXKZVMsnj+jP+pFyDY RXbatVDaozuRN6A3DnMplU7jjZmQdFZpYf7DAGLLCndSXkuTNBy6vG2rherYeXjqYesE Lcv0yEbMaqtkgG4cQrebLF8aAIOFeV+yRM6hQ7hP+V6HVNShCMzOctg/Vn1h1V0evTX0 f0CUX5cSChAx/Zw6ZlTBi4++ftip0qcmV6/KCYTXQTR4NWvRdiEVWGrG+6gSTdyilv6u ezmSxxt5fJrtZBrQzEQ6TYHIpajKWoFEdftGOXbpNx4e7QfpkoPsLApls0BPv668cSt2 43vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=nh34cblO; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si807436edt.351.2020.05.26.18.01.45; Tue, 26 May 2020 18:02:09 -0700 (PDT) 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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=nh34cblO; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390567AbgEZV7v (ORCPT + 99 others); Tue, 26 May 2020 17:59:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389510AbgEZV7u (ORCPT ); Tue, 26 May 2020 17:59:50 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85E00C03E96D for ; Tue, 26 May 2020 14:59:50 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id a23so17602019qto.1 for ; Tue, 26 May 2020 14:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nl/uXXKU7gTdY5ohqQbCJW8fZVN8yq+KGlncMZ1Utts=; b=nh34cblOgwiv74eH3cFlA/wA4QPin0iFdvZX2diA2WCH+OrXis3zyeuuWzA54DelhQ SuzIIwRk1yEdHMvT1ZAK0iPEx4Gf73gj1m2jCYzx+gJ0MKd6W+qIKfoxn0tVsuedldyz ETY7+HCE0x4OkNgdJkhIpKHjhE9l6dJHPLW5SJgnmaJJySodrzQv8SvNciZrePoNE1if L5ZYy3rMqudBO7SGWL/xh64XXFlZDyBS20E7QoDcNkz5Bd6Hq+VQZOkrFoLl1FkCYwqo qOk/Vn+EXOMcfLvX8ZhfvKqFbEYkf5YQgKuGlljHXQQG3EXc9xXqaOLUh9r/iNPB+4aj yDGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nl/uXXKU7gTdY5ohqQbCJW8fZVN8yq+KGlncMZ1Utts=; b=i430At+t+lr17Nmny0Oqttmz6BuyCVQvnuv/NxLE5U06cPEzFe7kgSRRVIUEeWg+bP GpdWLmvgmGe32rk8E/sjI0KW2h6UH7EnSkV/PebDCV+BaWm5V3++30HgEbixym7phNP6 8kj9mc+081HLM5eJPO1yxXM+lMATLmUJwVbYRUkLZ+8ZH6leRp1P+czyr7OmTs2bSykx 2Jcrro7x0so+HLDZtaiXbv6jvlENETlASSTCTaf29So0lh6uunCglkUgvUcQfBIDUlIc dkOjw8Q9MQcFjbrJX4PJ4bmNLQe827kFi1ODc1waGhoyZy80o1O4SNBMAiYQbKvBlptc unvw== X-Gm-Message-State: AOAM5329cG9VqhwMsGzhYa4BOgRjQaKzpwdzHj0OtrqZHrDNPcYwjdas 8gsvV9Y9Rd2hg4/hCWufcGGUiw== X-Received: by 2002:ac8:34d0:: with SMTP id x16mr1065099qtb.300.1590530389796; Tue, 26 May 2020 14:59:49 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:2921]) by smtp.gmail.com with ESMTPSA id o66sm791243qka.60.2020.05.26.14.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 14:59:49 -0700 (PDT) Date: Tue, 26 May 2020 17:59:25 -0400 From: Johannes Weiner To: Jens Axboe Cc: io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Subject: Re: [PATCH 04/12] mm: add support for async page locking Message-ID: <20200526215925.GC6781@cmpxchg.org> References: <20200526195123.29053-1-axboe@kernel.dk> <20200526195123.29053-5-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200526195123.29053-5-axboe@kernel.dk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 26, 2020 at 01:51:15PM -0600, Jens Axboe wrote: > Normally waiting for a page to become unlocked, or locking the page, > requires waiting for IO to complete. Add support for lock_page_async() > and wait_on_page_locked_async(), which are callback based instead. This wait_on_page_locked_async() is actually in the next patch, requiring some back and forth to review. I wonder if this and the next patch could be merged to have the new API and callers introduced together? > allows a caller to get notified when a page becomes unlocked, rather > than wait for it. > > We add a new iocb field, ki_waitq, to pass in the necessary data for this > to happen. We can unionize this with ki_cookie, since that is only used > for polled IO. Polled IO can never co-exist with async callbacks, as it is > (by definition) polled completions. struct wait_page_key is made public, > and we define struct wait_page_async as the interface between the caller > and the core. > > Signed-off-by: Jens Axboe Acked-by: Johannes Weiner