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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 BAF7EC3B186 for ; Wed, 12 Feb 2020 16:16:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7B8A22082F for ; Wed, 12 Feb 2020 16:16:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gOnxP52z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B8A22082F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E86D66B0464; Wed, 12 Feb 2020 11:16:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E380A6B0465; Wed, 12 Feb 2020 11:16:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D27546B0466; Wed, 12 Feb 2020 11:16:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id B54116B0464 for ; Wed, 12 Feb 2020 11:16:48 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 553A25010 for ; Wed, 12 Feb 2020 16:16:48 +0000 (UTC) X-FDA: 76481978496.29.pain93_1e448eef2f85d X-HE-Tag: pain93_1e448eef2f85d X-Filterd-Recvd-Size: 3749 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 16:16:47 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id ep11so1084537pjb.2 for ; Wed, 12 Feb 2020 08:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AmaqX/OYcw9WwIqxyuCSswBRAUdgAonA759dRndvozw=; b=gOnxP52zRt1wMXGrgdTWOQsS/m5XOgJTqBkFMwhtbA592oNZkp3/K12d/wE5c25xaB ODViVVNR6Wv6Y1V8unAoKaOZFPnWBcC5GGdYY3yQzhCD+r0/Hc0GDexd7BwhST2uvzON AI1KyB4DWu0468AYpCer1T/IDcfkGRIcA1+77FSpdgV7xfmn1HsmE0bARdVMlwbSJuiR oVaGQXER0ZNkLFBE7qOFZfoWHqtBLF8hu3MaL55vAmLJMRQhMU2Mk0HVEakitiQYGjQJ Oy5zAMHy7nRlV+4OYh/cqA+j2mXHleSosf+LIpKtHTTHoV96UOIioK3Wfh69G92afUno PG2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=AmaqX/OYcw9WwIqxyuCSswBRAUdgAonA759dRndvozw=; b=GVFoVCEkRKa8a4TiAe4IhSyPP0K/XoD3VWbe/Ow/6aCNxiqNqVTUx4i/NvuiwOKqw+ WOcZPsWflh6RopF/SPC/ER7dhCHpPaI9bz9ddaheQa6lXi6zpcjpa6mJrU1cgGmFrkMR YlEuJBH18xdjKFa2Y8SHU+H21xtjTq0OBsocTtRvZtNq5ArUqgLJObFj9FnCliFGE2zy iRC4j7cUHlXjROZt30boYp1x+WwPFJQ30k9Inyt3qVF5ZLNdjQhDBxeKHqo0FmxDGfZD eV4sMvit6XYWOIOJOQGBzCWlTOPJ9HkfYBhci96rlbybAWc1U4horXuEG1i7oFd9ZlLr 9EvA== X-Gm-Message-State: APjAAAVA8HEDFGM2p52iykOyv6qXOw1cTYENVCUn41aE5bUbBfy+q27h +K6ywBBl5nb1jfwIdDSFiHs= X-Google-Smtp-Source: APXvYqxKkRRRpSRnvQQvGr+w4cNioGKNJY3NFSjiWwbLUICOAzIlKjIBjaFg7tMS7MYgSEWShpwYZQ== X-Received: by 2002:a17:90a:c705:: with SMTP id o5mr10634501pjt.67.1581524206752; Wed, 12 Feb 2020 08:16:46 -0800 (PST) Received: from google.com ([2620:15c:211:1:3e01:2939:5992:52da]) by smtp.gmail.com with ESMTPSA id z30sm1461365pff.131.2020.02.12.08.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 08:16:45 -0800 (PST) Date: Wed, 12 Feb 2020 08:16:43 -0800 From: Minchan Kim To: Jan Kara Cc: Andrew Morton , linux-mm@kvack.org, Josef Bacik , Robert Stupp Subject: Re: [PATCH] mm: Don't bother dropping mmap_sem for zero size readahead Message-ID: <20200212161643.GA93795@google.com> References: <20200212101356.30759-1-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200212101356.30759-1-jack@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Feb 12, 2020 at 11:13:56AM +0100, Jan Kara wrote: > When handling a page fault, we drop mmap_sem to start async readahead so > that we don't block on IO submission with mmap_sem held. However > there's no point to drop mmap_sem in case readahead is disabled. Handle > that case to avoid pointless dropping of mmap_sem and retrying the > fault. This was actually reported to block mlockall(MCL_CURRENT) > indefinitely. > > Fixes: 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking operations") > Reported-by: Minchan Kim > Reported-by: Robert Stupp > Signed-off-by: Jan Kara Reveiewed-by: Minchan Kim