Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6788086pxb; Wed, 17 Feb 2021 13:31:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXrOy0rPVBcKYfVqX5sOSqYlfytA/r65y/maQYH6Hlcu6Lj3GoHFFFBne5SxqGqrcKZazS X-Received: by 2002:a17:906:2a01:: with SMTP id j1mr903174eje.416.1613597472929; Wed, 17 Feb 2021 13:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613597472; cv=none; d=google.com; s=arc-20160816; b=QTAiiXLOxrwPX+jXrGfWvKaEuVXCfPbKXBbCSYt6PZcUDmCH6Zia/AEKLNzNbKxW3t WnlpSGZlsQmWTjLG+xWZ1AS+sgQHf2wJN03PmgiuPv52ROPVbls94wbNB+WpRFOxz5Au aHgrulihKnMJt2R5bIJSs0SZv0A8EjHDbnvPkbSlidhmLHnwmPtxjLSKxdp1NnvrUl59 9bYqymTnZ23rNjK6FfCDqxuYo1h6NJWi5vnxywNHjcHhrMLz2ZyvBCDdF///58OEZscp hWVq3x5rKstmG8MiKWN4bScQUiNRxHvnf9XEoLJsHe1N8yxj1zLuXnfw6Xd5Vy4Rf0OK KMEA== 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=SNT38Fllc6tHutd44Y7GFooJxf2Yr4uXKo6Dx/78xZs=; b=FYbyxllGRxoIn1Y7LCY0GBI5wEoir4uGuEjAvV4LvvWJAoZmtoXfSe8ZMHfzGIKQ+/ zzUSb6ZxuPfyJkwr/Zx/ApwNPkOiQXD8UhW4bRBkcBCjafKtcFpG8HDlOYu7w6NzPpDi i7UQ59T1DH14kAOCcwBfEnObZG0yPNVqZLY75D+dv8ZSqBP4tfGsFwhOzMvRtPXoCB/m xFNILsg72s2c/4Br2+aa0dIZVgVHHN7ba4rg/9gmji1OzTwM1cc6fV8j5Fm9yB+jxo86 jYlGpi6Tt8qovLAR2Kt039Cu3cam8lUMjxlcj393TtYE79JiW1UqWyTtOOum1PEAR7DO RsFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ko737ihv; 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 t21si2558248edi.124.2021.02.17.13.30.48; Wed, 17 Feb 2021 13:31:12 -0800 (PST) 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=ko737ihv; 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 S232353AbhBQVSQ (ORCPT + 99 others); Wed, 17 Feb 2021 16:18:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbhBQVSL (ORCPT ); Wed, 17 Feb 2021 16:18:11 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B235C061574; Wed, 17 Feb 2021 13:17:31 -0800 (PST) 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=SNT38Fllc6tHutd44Y7GFooJxf2Yr4uXKo6Dx/78xZs=; b=ko737ihvincKwgVwE+SBcA7l+I XWxZegvieOZAgBBTlEL9fgJpmPxLWd1jW5LPbEkvD+IQrCs6O/lXQLANBJlRnEJ/saZx+xpqW7i9X dz3M4lraunZrtQQLvjWziGj9RFZ1zW1xH25nFhdHYJoLXp3z8Iz1avEaQ6061bJEATQ782M0ZlRuy e5JSMA5V2eNJM+r2xXLF1wddHA5hUEc53DRVkWyF88OvTMOzp9vno14qfS4/M5YEAnUyVGLyIfqJ3 jpsfb8ybZEPocMAlbcSGeVhLvbSslSWnImecTtH0vqIzsVDzKEWd7VjB6W9MaWvc2Y90ulCKYDIUO dAs0ovjQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lCUBA-000tCV-NY; Wed, 17 Feb 2021 21:16:28 +0000 Date: Wed, 17 Feb 2021 21:16:12 +0000 From: Matthew Wilcox To: Minchan Kim Cc: Michal Hocko , Andrew Morton , linux-mm , LKML , cgoldswo@codeaurora.org, linux-fsdevel@vger.kernel.org, david@redhat.com, vbabka@suse.cz, viro@zeniv.linux.org.uk, joaodias@google.com Subject: Re: [RFC 1/2] mm: disable LRU pagevec during the migration temporarily Message-ID: <20210217211612.GO2858050@casper.infradead.org> References: <20210216170348.1513483-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 17, 2021 at 12:46:19PM -0800, Minchan Kim wrote: > > I suspect you do not want to add atomic_read inside hot paths, right? Is > > this really something that we have to microoptimize for? atomic_read is > > a simple READ_ONCE on many archs. > > It's also spin_lock_irq_save in some arch. If the new synchonization is > heavily compilcated, atomic would be better for simple start but I thought > this locking scheme is too simple so no need to add atomic operation in > readside. What arch uses a spinlock for atomic_read()? I just had a quick grep and didn't see any.