Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10455886ybi; Wed, 24 Jul 2019 23:34:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+9COGZMuH9bHbKoJeHctjYlNzIXAaeI363f/AFCw5Ue6V+PlW8AE1r27KAUyD5QThuTqX X-Received: by 2002:a17:902:704c:: with SMTP id h12mr85596824plt.318.1564036441371; Wed, 24 Jul 2019 23:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564036441; cv=none; d=google.com; s=arc-20160816; b=zvx0rR89WWY8OqEWCdq+L75li31DKbb5SLjBcIUVTyeY9xnkYWgzdGEV1jrIB33qOM qfZUuu49fpEWg5rcKPM3iMoSU3msdNzDUO8P8YWUzDsbsrjuEay6Ch3nJ930KvE8gB0t N3bbKsp+UAATuTYyRP/oXqc7ot65Ke4Vn3yEqv7J8PBoVWy+QSRCVgfjNjyr6Tky6IFp cCr8yZPNh3zLTsZvhMep45cqtlsk3TE/fi0Ex6BrHWzvotnLiTp8Dx03eX+jnU3AX9HE V5I/+H1bogjIBXODOH002rg9BjJnB6G/YKE1jlOrV0/P1CM5bZm3e7i3mhrtIMCeibGp YaDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LRoqbDJHGfr38RXpT7qcza55DevlOlHgy5CoUePAUmA=; b=AL6ssgm6x8KyflVvUR6i6dXyNSPljgMmXQNMWUmDPBr/dG6zgFzWjKR5EhhFR+Uten HuKIPrRQs52bgQcvZAcb5tbvmo2KzYiOhW3JD/XU7G+gJt+DBJzA8SXTPmckGGkJI6Ck 9ii3jUqk3ruKutXdLIPKvTUTmdpLtMVekVfMItlEJFFo1wzNWDA04zl3LONVBWGEUClK dMv0VbBDP5GQ0ySsyk9jGkaDy6FBWtiXe5qcuGjndaaDOZeIKZPWA7+QFVwMRTk3H/Xo U0bK2O0NztqUto+GCJSIg8Nl2pohfXmw4LnndD5/6OA1ot6HmC8KSZ5a4m88R33jzFs9 LcwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ElkF0jZ2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si16928812pfo.108.2019.07.24.23.33.47; Wed, 24 Jul 2019 23:34:01 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ElkF0jZ2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729441AbfGYGRe (ORCPT + 99 others); Thu, 25 Jul 2019 02:17:34 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:37989 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727455AbfGYGRd (ORCPT ); Thu, 25 Jul 2019 02:17:33 -0400 Received: by mail-io1-f67.google.com with SMTP id j6so19677607ioa.5 for ; Wed, 24 Jul 2019 23:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LRoqbDJHGfr38RXpT7qcza55DevlOlHgy5CoUePAUmA=; b=ElkF0jZ2oXdbwt+dCFUKNeLkDixlYYHEpD+pFLmuOYWj6wWyJcscplUObqPiiwAmyW OKcMh09HoG8tb6nJaEneRZMa7p/p5Aa/Xw2wOGBvu5ro3WetRLqQ5RNfjfwGwGGgfbMH AtZf04obC8OEXzLfTJ1vFUeSdSJpVszRAbPF/6rDDPB0O44x5zPiNIm7uJUsewru5p0o VU31YGLkjCU0mUhgaDfqke3vxe43OfWiFY81rhYW99fQKA1gkl+6P1rHoZGwGG2mUS9I On/OQMC0fFPzzFgBI79nNP9Y9yiH8Fjs6jxIK10ffXre40U7yqMytaLqS/z5gaxBx5Eh zMBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LRoqbDJHGfr38RXpT7qcza55DevlOlHgy5CoUePAUmA=; b=asNjrohdpZfqlOFBn9WSzvmixXaDhczYLfENIA6lWZk4uJDP0nQ2KF+pUn0e7XyhAM ccMXFg+0WHIaTgwBQpTU67UNWHB1Fr5B045Yj26LhW7KxbJxlSaf5pqmLKvbSd0dDoVw hkmRdxvWTLkvp3QymKF6PVkrt2eroPeX3ttFYbZY30FAlSlmR0UQawrZ7nmlwydB12zF mRdZ5Si3R4mBNyC8JOJTz1GbQvNBniS8TvKvC0u7aGifhzW4qTiCccJNJPVpWOLK8Poj +/CS/pfS8tTw3zV3YSGCak5DeAoKgouPPrXq/iLl1VNqWqaPDWZbKi5JWae16W7b3crL EBJg== X-Gm-Message-State: APjAAAXCujfjgVPkFBuZ9seFVc15urbvFtoLx01pxNmQinOangF2ZhRj abenkN0T2WplpoCX+lU5T8wOQ9bBx07ZAidiL2P1kXy/PLMS4A== X-Received: by 2002:a02:bb05:: with SMTP id y5mr86296517jan.93.1564035452598; Wed, 24 Jul 2019 23:17:32 -0700 (PDT) MIME-Version: 1.0 References: <878ssqbj56.fsf@yhuang-dev.intel.com> <87zhl59w2t.fsf@yhuang-dev.intel.com> In-Reply-To: <87zhl59w2t.fsf@yhuang-dev.intel.com> From: Mikhail Gavrilov Date: Thu, 25 Jul 2019 11:17:21 +0500 Message-ID: Subject: Re: kernel BUG at mm/swap_state.c:170! To: "Huang, Ying" Cc: huang ying , Linux List Kernel Mailing , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. -- Best Regards, Mike Gavrilov.