Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp783357pxb; Wed, 3 Nov 2021 12:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysDkcxp2uVHgANVvKWYP9Wy7wyYZek6VVT4x8eHxw2/a2jzjlDwQJj3krwA7VD+Mlb0GMg X-Received: by 2002:a50:d841:: with SMTP id v1mr62451901edj.221.1635967129012; Wed, 03 Nov 2021 12:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635967129; cv=none; d=google.com; s=arc-20160816; b=IO/d4Vamzk0QPyCq2WB3ALGgL3bfD0rx+TJEvocPq+emYFcEpDWsA6B7PvLFUDkGw0 B2cdftj3oivrrFsbctM3AmJfMde8rpajsUq1eofi/a3SRiSoYvqZ7bEd85WCvhId7mj/ 1iE4jhBDd3sbrsrJL3S8xBIvMVdrLxcwzDsZyzwWgGXfVhbYkcP7NY9sHfI9SijAnsB1 N/e1vL8uuotGhwjcbHP8KWs4FUiwADkSxhNmwPSPd33uQ1qd6n5kk2QDu+pWMC2TUIOt rnhlpvG1FGFmphMGO0vov2DOblitVkjTTjCw0ce49fi2X6gh8tUzmPrPxjt8YOeg8wKW IxZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=umVR0keNkS2UpdTDJLTibW+h8rMr6o3BNZfkH6UmL48=; b=UfHoSXk+5zLE1HqCpnZKYogrz3SRW+oO1ZdbxancceJc0MBDSWKjpEHr3MRk2YUoQp E2fI1Flwb32/LsTYPGkbPqVr7q+VofWkF/VZf94haQ3UorxkDmMefCt3s24asLwnxOKN RONoabsz8pQ8hG1n8ecIaDPKLepzBxdwv2Ry+znYBMg0pRdKU7OpQM2OP2uruUMl6HrO 7aK6mUFlpAZ8fjverlEKIOiCvfjEx16Z+zn5OpoXv8uxjRcGBd3vo0XjmLKrwsp6zSq5 6i4vtI4ObGsCU+xDFreXbdP3quNzqgn5oNkDKL5zx3e36qx/Cr35RMcCOECLbq4uNKc1 mumg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=pyjGUN2B; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du20si6686268ejc.550.2021.11.03.12.18.25; Wed, 03 Nov 2021 12:18:49 -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=@infradead.org header.s=casper.20170209 header.b=pyjGUN2B; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbhKCTRK (ORCPT + 99 others); Wed, 3 Nov 2021 15:17:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbhKCTRK (ORCPT ); Wed, 3 Nov 2021 15:17:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B275C061714 for ; Wed, 3 Nov 2021 12:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=umVR0keNkS2UpdTDJLTibW+h8rMr6o3BNZfkH6UmL48=; b=pyjGUN2BuGsm3EgukKxwqY7GOJ HrXc37aP07LX0ODtwW+vxnF5VaNhP481iARxy4xGWWosUjZ7N6898ensPPRHcILwf5JtPu/mmmeZD KIzbOwe8LSoBqDIVWiUBkBPsA6WjhislKnkUe9chTSBczWdABUK9+7ZZi4VQjbm28gBZvf70yuSXQ 4C7lCluyldy68qY64OpICWAH2iKaCEDhOEUBavktWjZnaMdRf96mYXNWsDtJJrFy5LsYHQSPV23mh ZOw3vRscEr8qc0e2vZsvwsAZcWqU5k5ZPFe0676Syf/Mb7dUTYloyUONcpMigGWbNZ6zbcV7VLbQT tlJENPTg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1miLee-005Pgd-ST; Wed, 03 Nov 2021 19:11:06 +0000 Date: Wed, 3 Nov 2021 19:10:36 +0000 From: Matthew Wilcox To: Jimmy Shiu Cc: mingo@redhat.com, joaodias@google.com, wvw@google.com, Minchan Kim , Will McVicker , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Andrew Morton , David Howells , Vlastimil Babka , William Kucharski , "Kirill A. Shutemov" , Andreas Gruenbacher , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] SCHED: attribute page lock and waitqueue functions as sched Message-ID: References: <20211103184708.1778294-1-jimmyshiu@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211103184708.1778294-1-jimmyshiu@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 04, 2021 at 02:47:03AM +0800, Jimmy Shiu wrote: > +++ b/mm/filemap.c > @@ -1271,7 +1271,7 @@ static inline bool folio_trylock_flag(struct folio *folio, int bit_nr, > /* How many times do we accept lock stealing from under a waiter? */ > int sysctl_page_lock_unfairness = 5; > > -static inline int folio_wait_bit_common(struct folio *folio, int bit_nr, > +static inline __sched int folio_wait_bit_common(struct folio *folio, int bit_nr, It's not clear to me whether folio_wait_bit_common() needs to be marked as __sched or whether marking its callers is sufficient, but I'm pretty sure you forgot to mark put_and_wait_on_page_locked() as __sched, which is an important one as it's now where we wait for readahead to finish when reading a file.