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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 62E7EC63777 for ; Thu, 26 Nov 2020 13:38:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D8CAF22201 for ; Thu, 26 Nov 2020 13:38:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="a0N4KrUD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8CAF22201 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 37C936B0075; Thu, 26 Nov 2020 08:38:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 32D976B0078; Thu, 26 Nov 2020 08:38:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26AEF6B007B; Thu, 26 Nov 2020 08:38:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 117766B0075 for ; Thu, 26 Nov 2020 08:38:06 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CCCD63633 for ; Thu, 26 Nov 2020 13:38:05 +0000 (UTC) X-FDA: 77526672930.17.stick67_0c0ca4f2737f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id AF5FA180D0181 for ; Thu, 26 Nov 2020 13:38:05 +0000 (UTC) X-HE-Tag: stick67_0c0ca4f2737f X-Filterd-Recvd-Size: 5329 Received: from smtp-fw-4101.amazon.com (smtp-fw-4101.amazon.com [72.21.198.25]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 13:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1606397885; x=1637933885; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=G/pChsn4fN3Vyl1crrOE4ndzcerWTWr/tVT2Qyr7i24=; b=a0N4KrUDQki8GNjEhJ+VOiXpMARJjCuSucNavaBxCp6F1JdyUoB2Rsxu caV/jIcwDnWrA1NFpP2JffUtnDYyEQuxGL5RYSa7SR8NOXzBarNVrfsXD Xgj6nExgt8+lDWDXRO/mkgxlQlXyMKaH9LHzTE6LlLJEfYm3ENmkAHxQq k=; X-IronPort-AV: E=Sophos;i="5.78,372,1599523200"; d="scan'208";a="66219790" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 26 Nov 2020 13:37:58 +0000 Received: from EX13D31EUA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com (Postfix) with ESMTPS id A071FA21E3; Thu, 26 Nov 2020 13:37:46 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.160.229) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 26 Nov 2020 13:37:30 +0000 From: SeongJae Park To: Shakeel Butt CC: SeongJae Park , SeongJae Park , , Andrea Arcangeli , , , , , , Brendan Higgins , Qian Cai , Colin Ian King , Jonathan Corbet , "David Hildenbrand" , , Marco Elver , "Du, Fan" , , "Greg Thelen" , Ian Rogers , , "Kirill A. Shutemov" , Mark Rutland , Mel Gorman , Minchan Kim , Ingo Molnar , , "Peter Zijlstra (Intel)" , Randy Dunlap , Rik van Riel , David Rientjes , Steven Rostedt , Mike Rapoport , , Shuah Khan , , , Vlastimil Babka , Vladimir Davydov , Yang Shi , Huang Ying , , , Linux MM , , LKML Subject: Re: [PATCH v22 07/18] mm/page_idle: Avoid interferences from concurrent users Date: Thu, 26 Nov 2020 14:37:15 +0100 Message-ID: <20201126133715.4468-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.229] X-ClientProxiedBy: EX13D11UWC003.ant.amazon.com (10.43.162.162) To EX13D31EUA001.ant.amazon.com (10.43.165.15) 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, 25 Nov 2020 07:30:27 -0800 Shakeel Butt wrote: > On Tue, Oct 20, 2020 at 2:06 AM SeongJae Park wrote: > > > > From: SeongJae Park > > > > Concurrent Idle Page Tracking users can interfere each other because the > > interface doesn't provide a central rule for synchronization between the > > users. Users could implement their own synchronization rule, but even > > in that case, applications developed by different users would not know > > how to synchronize with others. To help this situation, this commit > > introduces a centralized synchronization infrastructure of Idle Page > > Tracking. > > > > In detail, this commit introduces a mutex lock for Idle Page Tracking, > > called 'page_idle_lock'. It is exposed to user space via a new bool > > sysfs file, '/sys/kernel/mm/page_idle/lock'. By writing to and reading > > from the file, users can hold/release and read status of the mutex. > > Writes to the Idle Page Tracking 'bitmap' file fails if the lock is not > > held, while reads of the file can be done regardless of the lock status. > > > > Note that users could still interfere each other if they abuse this > > locking rule. Nevertheless, this change will let them notice the rule. > > > > Signed-off-by: SeongJae Park > > I don't think this is allowed. I mean returning to user space with > held mutex and other processes can unlock it. I don't think mutex is > what you need. Or more importantly is this really an issue? > In a separate call, I and Shakeel agreed on that this is trying to fix an issue that aren't proved real. So I will drop this patch in next version of the patchset. We can restore this patch or find better fix later if the problem comes out in real. Thanks, SeongJae Park