Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp782054imu; Tue, 20 Nov 2018 06:56:30 -0800 (PST) X-Google-Smtp-Source: AJdET5fr5a9bexdymA4x/c08G9zFqmT2FAUVnMei/LBAMwywu3d8YHkyw24aCQKYNMSyQtKX0vEo X-Received: by 2002:a62:6a88:: with SMTP id f130mr2504990pfc.201.1542725790217; Tue, 20 Nov 2018 06:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542725790; cv=none; d=google.com; s=arc-20160816; b=V8mDyJSWy33jDvCtphKwapXOzc37Zu9s5gWRbKky3bFtVHuyMwpxD4HfU5GyYGYrFB oyaRHtsh+Tj1lR3YhZXoMwiaxXR7ptDkVpskxgrjOdm0dfDdyE5Nwp6AR1HgB7P34mkV yZ5YvIFN8k82o6oZ0uBg8c7smssG0dWRo99fRkw+jGMUU+2vpCneXDSaqeh3/AH34Aa+ TInR/GZvkwJ/yiGbPa+pbgnT/+JGBfyF6BYq9oyufeGyJiRyoZNEnW5V2SQtiGPM5Xqf MNbwA7ZpzzdsD1XMm9hgnfQq11jk4Pqk80ic11E8YQ7wS7vRNGClzP9O6beT0OEek0RM FjoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Bf5n/hjD4LuBtMg0vL7R93izlrTUbK1wdlLBwdCPRGs=; b=kQtJU+hdSwC0mCwdLRSdX7+ifpBgtlF+HTLwWECgTniU9QgIJh/w4g0Vl9GWeL7iud jhliLFZqv3TLbPiY7Vf+lGHhKZF/SiYTFn2JVs16uCgKEgNGUuFjCgNxfNW57spB5f40 g4UfNy5jtQeRqUmKJeab60emCfOLOrZLVbmHnB5SKKLFPfqz3hctUwDqdACobP+Z6HlP /DWewEXfhLzmmO1NltGYV06Y30gJ9+Qp9M1/K2+Mz6hXZO4AxN07D1lSMjhfymOTHg9x 0tLkNVPL1UU/kJZvAGfQy/JGdQ9B2nVNrxyyV/9Km6hoaFhubDAHRSrtzRayIt0cFTXz FuQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TIWgxvOv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i198si31855537pfe.289.2018.11.20.06.56.15; Tue, 20 Nov 2018 06:56:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TIWgxvOv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbeKTXmB (ORCPT + 99 others); Tue, 20 Nov 2018 18:42:01 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:59764 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725902AbeKTXmA (ORCPT ); Tue, 20 Nov 2018 18:42:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Bf5n/hjD4LuBtMg0vL7R93izlrTUbK1wdlLBwdCPRGs=; b=TIWgxvOvFxo9EkS83on2bxDT8 Z6dNHzqjLx23BCOdxrIUqqFghr+G6c40gx4x9Pea0f+A6fS8X9fpHi2Qrc0cmi0e2aL6vBNQHoY+n wzekXfBc9rSrf0rUwssAtHAhoESAWLtWix8IA/Heu+NscKeifEGT7sePZ/xYd0ZSvDfr0S+WZHJ+D tKC+Xz+K9bbHKxDjFPbqRneq94pw19jfPskwDJmAWOn8xDZCwo6Fjse+okwAVAZh3N8MCQsDTvg5z CCE1NvozRB2km34cd+Zev2h0MyIwJMo8eSvBtbILsilFVFpKJdGV4HHSXrbILIMxn2U+nc1YqD3V8 DUbpecEdA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP5pf-0003Db-Fr; Tue, 20 Nov 2018 13:12:47 +0000 Date: Tue, 20 Nov 2018 05:12:47 -0800 From: Matthew Wilcox To: Hugh Dickins Cc: Yu Zhao , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: fix swap offset when replacing shmem page Message-ID: <20181120131247.GA3065@bombadil.infradead.org> References: <20181119004719.156411-1-yuzhao@google.com> <20181119010924.177177-1-yuzhao@google.com> <20181120012950.GA94981@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 19, 2018 at 09:07:27PM -0800, Hugh Dickins wrote: > I don't much like my original use of the name "swap_index", when it was > not the index in a swapfile (though it was the index in the radix tree); > but it will become a correct name with your patch. > > Though Matthew Wilcox seems to want us to avoid saying "radix tree"... Naming is hard ... but the Linux radix tree looks almost nothing like a classic computer science radix tree. If you try to reconcile our implementation with the wikipedia article on radix trees, you'll get very confused. A lot of places where we were saying 'radix tree' in comments should really have said 'page cache'. So is this a swap cache index? I'm not really familiar enough with the swapping code to say.