Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11061370ybi; Thu, 25 Jul 2019 09:17:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzINU4Mw6gN7Ju8tLkTUbhQ0y53whhe/hFlJITVe8IteDFHq9RG86IlGd6+/AGVzdSZsR3X X-Received: by 2002:aa7:93bb:: with SMTP id x27mr18027065pff.10.1564071445580; Thu, 25 Jul 2019 09:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564071445; cv=none; d=google.com; s=arc-20160816; b=P+iuQcw/h6folbiUveDrdHbI8PlP8ZMTPUYED6C0uCTTE8Dk35DtfkHGTv3N4JYuW8 FeEEI8WNdyHazX3dl4+kKO/uqziQ0sKmYMSXpoXpe0yR/N1b4LQ/wfrxKx3L3jyL/gtJ oPyqxpXx0kfekZPlsWVUecEEGKY9kMq3hTQ8Sn1Mk8lXGRyGUfUR4gZXZCiNRj0rkV9e fCOJua/PG1+pnzmCCYA+Q8QDNfdovxDpHD3tmwf/wnfZd0c6WYVKVY0U9rep6zHnpi20 zMOOxAK1gQN5phEUVxeljHp20h5z0iRKZHb5yjyld8DZNnrBUwIIJ83Vpkizucxc5Di6 ZsVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=pl4VFNjumg1HwDu/CJY+b146qJd52pJu/R/JaNNnLPY=; b=wj5n80udCJf1y816s/sf3RvtWSZIgSN8ec5yqUq4bwpo7rcB7qUS4eif3Qoo2evj7f rowctty/Btq4nQFmf/ZijQyaCR7uINauKYd2QJJWLm7sGSO1xMyblTshy46zesJxuNl5 gWWT/4qRv1JmjF4qVj5ilxfS2IWAnSYquvgDYTbQ3mMcmF22iNfJBjg4l2xEDy7gwMmw 6Q5fi6tuAYkly3CMxRXt2po3SGsR4Wss9BUROocJR6I7bUvhdFTSnC4sSfWog2usGS7b cKPiXanpC2i8weCFuMSOQBOplH9E/Br9fsD88Yxj3rGJV2Xq/S7HFsnoGO9JzM0CqnyG TSgA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si14755616pfp.107.2019.07.25.09.17.10; Thu, 25 Jul 2019 09:17:25 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729441AbfGYHOR (ORCPT + 99 others); Thu, 25 Jul 2019 03:14:17 -0400 Received: from mga01.intel.com ([192.55.52.88]:16267 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbfGYHOR (ORCPT ); Thu, 25 Jul 2019 03:14:17 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 00:14:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,305,1559545200"; d="scan'208";a="253846210" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.29]) by orsmga001.jf.intel.com with ESMTP; 25 Jul 2019 00:14:15 -0700 From: "Huang\, Ying" To: Mikhail Gavrilov , "Kirill A. Shutemov" , Matthew Wilcox Cc: huang ying , Linux List Kernel Mailing , Subject: Re: kernel BUG at mm/swap_state.c:170! References: <878ssqbj56.fsf@yhuang-dev.intel.com> <87zhl59w2t.fsf@yhuang-dev.intel.com> Date: Thu, 25 Jul 2019 15:14:15 +0800 In-Reply-To: (Mikhail Gavrilov's message of "Thu, 25 Jul 2019 11:17:21 +0500") Message-ID: <87v9vq7fi0.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mikhail Gavrilov writes: > On Tue, 23 Jul 2019 at 10:08, Huang, Ying wrote: >> >> Thanks! I have found another (easier way) to reproduce the panic. >> Could you try the below patch on top of v5.2-rc2? It can fix the panic >> for me. >> > > Thanks! Amazing work! The patch fixes the issue completely. The system > worked at a high load of 16 hours without failures. Thanks a lot for your help! Hi, Matthew and Kirill, I think we can fold this fix patch into your original patch and try again. > But still seems to me that page cache is being too actively crowded > out with a lack of memory. Since, in addition to the top speed SSD on > which the swap is located, there is also the slow HDD in the system > that just starts to rustle continuously when swap being used. It would > seem better to push some of the RAM onto a fast SSD into the swap > partition than to leave the slow HDD without a cache. > > https://imgur.com/a/e8TIkBa > > But I am afraid it will be difficult to implement such an algorithm > that analyzes the waiting time for the file I/O and waiting for paging > (memory) and decides to leave parts in memory where the waiting time > is more higher it would be more efficient for systems with several > drives with access speeds can vary greatly. By waiting time I mean > waiting time reading/writing to storage multiplied on the count of > hits. Thus, we will not just keep in memory the most popular parts of > the memory/disk, but also those parts of which read/write where was > most costly. Yes. This is a valid problem. I remember Johannes has a solution long ago, but I don't know why he give up that. Some information can be found in the following URL. https://lwn.net/Articles/690079/ Best Regards, Huang, Ying > -- > Best Regards, > Mike Gavrilov.