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=-15.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 2AF57C433E0 for ; Wed, 3 Mar 2021 00:15:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8F19364F1C for ; Wed, 3 Mar 2021 00:15:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F19364F1C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1B4B18D00FD; Tue, 2 Mar 2021 19:15:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 15A828D00FC; Tue, 2 Mar 2021 19:15:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0B2E8D00FD; Tue, 2 Mar 2021 19:15:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id F03C18D00FC for ; Tue, 2 Mar 2021 19:15:50 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AF05F173087A for ; Wed, 3 Mar 2021 00:15:50 +0000 (UTC) X-FDA: 77876644860.23.376245B Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf06.hostedemail.com (Postfix) with ESMTP id 56D45C0001F7 for ; Wed, 3 Mar 2021 00:15:49 +0000 (UTC) Received: by mail-pj1-f44.google.com with SMTP id i14so3029232pjz.4 for ; Tue, 02 Mar 2021 16:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=15Da8L//sZLVa2Y/ktpbgOliSO5Jn4xUavXDRLvhsOA=; b=Y5g4XHk+/UMlDKjZ/drhzQVkaKC12cxaqlcEN1kUgbDrDN89JycT3r3FP5IJe1wyeO LSZ2FE1EohmUkAyFj8hmVQ2cOFES7691g4VWQXEsL0jaBS/SsAw39NrqQRv4VQg0eZGV oCcUbUy00z4DxvkBbHpurG2clTHdeh3hnUmRUpIP3LL0fhrqzILWANTwHUun76msgjzn pk8SMEPz9peTtkl+xot7dVYWGSpB1+/3GR7PzMIsQFW0OgUMNQC4Facc+hVHVP4kYEGH PJlYbx+a8w8Jq8AYM/YMtL8/M+zW236abBnVGYRWxlOqwVueb3b3jWdsEhJA3Qeb+xVG FPng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=15Da8L//sZLVa2Y/ktpbgOliSO5Jn4xUavXDRLvhsOA=; b=hTshng4QDODInr+aeHI9/zlbJqJvZBwm52MxeKawKHS86Gs07kB71KPhsGm9Cf6PfH I/ujytrGgfZvhHhm2G7ays1+JeqikTVg3iH0gcA9yh+3j6EN4fnTGGPnd7ajGlTXOYHs QJnVH260PKOEisOd9BgQi6+QncM+lv8rd6Axd4MdCkRLnB2koPcuExuDe3ufmHfHQYg6 dZQDI0sGXWp6dLVn+yguai9G8WPLKWCmI6XNDz239lNwxj0+8NdkOMpAsRpm/947i7uQ rFdsEOIBS9t2QZsU9c9ABbyRP1mi0ZLkaCZsVOjKfgHd043TUmOdm4LMahR17kdBtRjy w0LA== X-Gm-Message-State: AOAM530JpI1dpOfPLi1B7V/bqea2/4Ma9oJZXEnDW1BKKpXQvyKHSyC9 FDIvE978yMjNjlj1eVY+JOi4XQ== X-Google-Smtp-Source: ABdhPJxQQNJn1d1rYqHGMSy/uUQk0iR29GqxUGZaqbZqIds+6YpZ2XdzWXgb6/fQSwghyGrdJbzFng== X-Received: by 2002:a17:902:dac9:b029:e4:b52f:1d38 with SMTP id q9-20020a170902dac9b02900e4b52f1d38mr466469plx.15.1614730548695; Tue, 02 Mar 2021 16:15:48 -0800 (PST) Received: from [192.168.1.134] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id d7sm11942053pfh.73.2021.03.02.16.15.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 16:15:48 -0800 (PST) Subject: Re: [Intel-gfx] Public i915 CI shardruns are disabled To: Linus Torvalds , Dave Airlie Cc: Christoph Hellwig , Damien Le Moal , Johannes Thumshirn , Chaitanya Kulkarni , "Sarvela, Tomi P" , Linux Memory Management List , Andrew Morton , "intel-gfx@lists.freedesktop.org" References: <51946a94b1154605bd7dda2c77ab12fc@intel.com> From: Jens Axboe Message-ID: Date: Tue, 2 Mar 2021 17:15:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Stat-Signature: rfxt4ens1nnkfuomd1secnymq389ayhn X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 56D45C0001F7 Received-SPF: none (kernel.dk>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail-pj1-f44.google.com; client-ip=209.85.216.44 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614730549-116254 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 3/2/21 4:56 PM, Linus Torvalds wrote: > On Tue, Mar 2, 2021 at 3:38 PM Dave Airlie wrote: >> >> Looks like Jens saw it at least, he posted this on twitter a few mins >> ago so I assume it'll be incoming soon. >> >> https://git.kernel.dk/cgit/linux-block/commit/?h=swap-fix > > Ahh. You use a swap file. This might be the same thing that I think > the phoronix people hit as ext4 corruption this merge window. > > Jens, if that can get confirmed, please send it my way asap.. Thanks, Yep, it's the same issue indeed. Was made aware of it after lunch today and emailed Christoph, but then decided to dig into it myself a few hours later. Andrew already queued it up I just saw, but I noticed that that version will break on !CONFIG_HIBERNATION. Patch below if you just want to grab it. commit e25b1010db005a59727e1ff5f43af889effd31a3 Author: Jens Axboe Date: Tue Mar 2 14:53:21 2021 -0700 swap: fix swapfile read/write offset We're not factoring in the start of the file for where to write and read the swapfile, which leads to very unfortunate side effects of writing where we should not be... Fixes: 48d15436fde6 ("mm: remove get_swap_bio") Signed-off-by: Jens Axboe diff --git a/include/linux/swap.h b/include/linux/swap.h index 32f665b1ee85..4cc6ec3bf0ab 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -485,6 +485,7 @@ struct backing_dev_info; extern int init_swap_address_space(unsigned int type, unsigned long nr_pages); extern void exit_swap_address_space(unsigned int type); extern struct swap_info_struct *get_swap_device(swp_entry_t entry); +sector_t swap_page_sector(struct page *page); static inline void put_swap_device(struct swap_info_struct *si) { diff --git a/mm/page_io.c b/mm/page_io.c index 485fa5cca4a2..c493ce9ebcf5 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -254,11 +254,6 @@ int swap_writepage(struct page *page, struct writeback_control *wbc) return ret; } -static sector_t swap_page_sector(struct page *page) -{ - return (sector_t)__page_file_index(page) << (PAGE_SHIFT - 9); -} - static inline void count_swpout_vm_event(struct page *page) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE diff --git a/mm/swapfile.c b/mm/swapfile.c index f039745989d2..084a5b9a18e5 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -219,6 +219,19 @@ offset_to_swap_extent(struct swap_info_struct *sis, unsigned long offset) BUG(); } +sector_t swap_page_sector(struct page *page) +{ + struct swap_info_struct *sis = page_swap_info(page); + struct swap_extent *se; + sector_t sector; + pgoff_t offset; + + offset = __page_file_index(page); + se = offset_to_swap_extent(sis, offset); + sector = se->start_block + (offset - se->start_page); + return sector << (PAGE_SHIFT - 9); +} + /* * swap allocation tell device that a cluster of swap can now be discarded, * to allow the swap device to optimize its wear-levelling. -- Jens Axboe