From owner-freebsd-hackers@freebsd.org Fri Nov 16 05:15:53 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE99A1126FDE; Fri, 16 Nov 2018 05:15:52 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 313447164E; Fri, 16 Nov 2018 05:15:52 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: by mail-wr1-x444.google.com with SMTP id r10so5978878wrs.10; Thu, 15 Nov 2018 21:15:52 -0800 (PST) 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; bh=hE7Sx55WK00Rb8ivDBuw4X90MwgdBCU0BVTv/D8lXQ4=; b=hTQxTEg43N3DhgteZFVuQG9d/0JmynqIZOGXFHbnbjSqJa3GQFWSPqGRI1JopRLtLo nd7YP1nY3UJQAyxURljNSv2OfPViDQMZ4580WRY1FfRrIiTpHSWxGN3NJ8Td8GNtZgMs XtYPvfvoqiuAF+dvzLSnltjfmUJDD76Yy8ow/3cS7UOCtzj18d3uGbkTe87vSR7AqUMy R7jh0f5Buxdw4b+rK1UHeONjswGcxtBC2EaVVc8eaQxBwUWNlJQQdNnOo5oA/JcdnPuc 5BpnlbrK9VsU6831klHJ4oRnDZ66Te/9ko5v3b5aok2+Qg1Fsu7vXq4L289aosG6ZEmw Nljg== 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; bh=hE7Sx55WK00Rb8ivDBuw4X90MwgdBCU0BVTv/D8lXQ4=; b=h5mqU3L9y3QoY+PWeDrMCMjkuikYZ0bR8wM2l+/TYWylX56H7Uzis6AZmWHZvEJ8zf NYoA074U8fTsAiffEHG0c1VRqubvkqiaI64nEsjDrbFisez5X64PkiXuPIs+X0NjamEY MTYaDx5TaTjpeLWpxZss9X7zRZLr9aUSJYqWpa4UGis9voolcrrNKXLTEzDeZpsMMrut ciltFHCBFbl+dqL5mk4o1VA4PwR2EJkGeo80MIqHwlh+tUNq/fAp7F3vZx2oGvTxdF79 jXFGiOtN+PYnX4jyrtgXqz2+MwGpyc/KIEJFk3/B/jVZM+caJaG4DjOJuSJzIVHPwKq9 iSxw== X-Gm-Message-State: AA+aEWbS42kI7h04dok/dZzY4ai7NV0m0y46o335GY4RRAHx2XRY/hcF +Vh0Rjh43ZHjG2138KxDEPd8F/ZMqJsleypOQGxT6w== X-Google-Smtp-Source: AFSGD/XAqk1/aoZsDy+L32I9JPhpxLr36i+m75vVYGYMC4VriI/Pdunlw0rmJwTmmae9n240IXnpMkAjbGrz07WNpYM= X-Received: by 2002:adf:ff09:: with SMTP id k9mr1462299wrr.97.1542345350727; Thu, 15 Nov 2018 21:15:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rajesh Kumar Date: Fri, 16 Nov 2018 10:45:39 +0530 Message-ID: Subject: Re: Enabling a ACPI eMMC device is causing kernel reboots with FreeBSD 11.2 To: freebsd-amd64@freebsd.org, freebsd-acpi@freebsd.org, freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 313447164E X-Spamd-Result: default: False [-5.26 / 40.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-1.28)[ip: (-2.61), ipnet: 2a00:1450::/32(-1.87), asn: 15169(-1.81), country: US(-0.10)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[4.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 05:15:53 -0000 Hi, I did some study on this. During acpi_attach, if MCFG table is present, FreeBSD tries to use it (That is to map the PCI Base address to virtual address space). Setting hw.pci.mcfg=0, disables that mapping and lets the system use the type 1 config access (which is IO port based access). So, this is what hw.pci.mcfg does. In our case, we are enabling a device on the ACPI bus and made sure no other ACPI device collides with the address range for PCI (which mcfg says). So, why enabling a device on ACPI, is causing the memory mapped PCI access go bad to panic/reboot the kernel? I tried to collect more info enabling INVARIANTS, but in that case kernel panics much before in the boot process. So, how could I proceed in debugging this issue? Any suggestions? On Thu, Nov 8, 2018 at 4:14 PM Rajesh Kumar wrote: > Hi, > > I have amd64 board, which has a eMMC device on the ACPI bus. When I try > booting FreeBSD 11.2 on this board, with eMMC device disabled in BIOS, it > boots without any issues. But, when eMMC device is enabled in BIOS, > FreeBSD 11.2 continuously reboots. > > When I have the following tunable set, FreeBSD 11.2 boots without any > issues with eMMC enabled. > hw.pci.mcfg=0 > > Observations : > a) We have verified the ACPI device addresses (from DSDT table) doesn't > conflict with the PCI address base (configured in MCFG table). > b) The PCI address base from MCFG table is read correctly by kernel > (Verbose boot prints that address). So, I don't think MCFG table pointer is > corrupted and getting read properly. > > Questions : > a) What does hw.pci.mcfg=0 actually do to get the reboot issue resolved? > b) Why enabling a device on ACPI bus needs hw.pci.mcfg (PCI specific) to > boot? > > Looks like the system reboots when the ACPI and PCI devices enumeration > starts during the boot. So, seems ACPI (or) PCI devices aren't getting > enough resources and so reboots. > > Thanks, > Rajesh. > From owner-freebsd-hackers@freebsd.org Fri Nov 16 06:35:41 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD081128BFD; Fri, 16 Nov 2018 06:35:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6A8A7351D; Fri, 16 Nov 2018 06:35:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wAG6ZTqC075685 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 16 Nov 2018 08:35:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wAG6ZTqC075685 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wAG6ZTlt075678; Fri, 16 Nov 2018 08:35:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Nov 2018 08:35:29 +0200 From: Konstantin Belousov To: Rajesh Kumar Cc: freebsd-amd64@freebsd.org, freebsd-acpi@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Enabling a ACPI eMMC device is causing kernel reboots with FreeBSD 11.2 Message-ID: <20181116063529.GP2378@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: A6A8A7351D X-Spamd-Result: default: False [-5.17 / 40.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; IP_SCORE(-2.17)[ip: (-2.68), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.57), country: US(-0.10)]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 06:35:41 -0000 On Fri, Nov 16, 2018 at 10:45:39AM +0530, Rajesh Kumar wrote: > Hi, > > I did some study on this. During acpi_attach, if MCFG table is present, > FreeBSD tries to use it (That is to map the PCI Base address to virtual > address space). Setting hw.pci.mcfg=0, disables that mapping and lets the > system use the type 1 config access (which is IO port based access). So, > this is what hw.pci.mcfg does. > > In our case, we are enabling a device on the ACPI bus and made sure no > other ACPI device collides with the address range for PCI (which mcfg > says). So, why enabling a device on ACPI, is causing the memory mapped PCI > access go bad to panic/reboot the kernel? I tried to collect more info > enabling INVARIANTS, but in that case kernel panics much before in the boot > process. So, how could I proceed in debugging this issue? Any suggestions? There is no ACPI bus, at best the device is enumerated using ACPI. > > > On Thu, Nov 8, 2018 at 4:14 PM Rajesh Kumar wrote: > > > Hi, > > > > I have amd64 board, which has a eMMC device on the ACPI bus. When I try > > booting FreeBSD 11.2 on this board, with eMMC device disabled in BIOS, it > > boots without any issues. But, when eMMC device is enabled in BIOS, > > FreeBSD 11.2 continuously reboots. What is the CPU in your motherboard ? If it is AMD, try HEAD or latest 12.0 BETA. > > > > When I have the following tunable set, FreeBSD 11.2 boots without any > > issues with eMMC enabled. > > hw.pci.mcfg=0 > > > > Observations : > > a) We have verified the ACPI device addresses (from DSDT table) doesn't > > conflict with the PCI address base (configured in MCFG table). > > b) The PCI address base from MCFG table is read correctly by kernel > > (Verbose boot prints that address). So, I don't think MCFG table pointer is > > corrupted and getting read properly. > > > > Questions : > > a) What does hw.pci.mcfg=0 actually do to get the reboot issue resolved? > > b) Why enabling a device on ACPI bus needs hw.pci.mcfg (PCI specific) to > > boot? > > > > Looks like the system reboots when the ACPI and PCI devices enumeration > > starts during the boot. So, seems ACPI (or) PCI devices aren't getting > > enough resources and so reboots. > > > > Thanks, > > Rajesh. > > > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Sat Nov 17 08:09:34 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA43A112BBCE for ; Sat, 17 Nov 2018 08:09:33 +0000 (UTC) (envelope-from miltonott@fastmail.com) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5BF78032F for ; Sat, 17 Nov 2018 08:09:31 +0000 (UTC) (envelope-from miltonott@fastmail.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 4B4E3CC3 for ; Sat, 17 Nov 2018 03:09:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 17 Nov 2018 03:09:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= date:from:message-id:to:subject:in-reply-to; s=fm1; bh=9wlkAexnb uaFPyXNo0Tm7XJLG6oDsuopQJVYzP198NA=; b=bMrZqu1O39dFrLK/y+z0htf3L fEfO3cOJ098MANguYfZtmkq2PuM6bLw11NHeXLkAuS9VhNzuHCiWbymyUS23WT1t gjaNQFVNV0Sy3JLltlC+yyaBp4OkVjRq5METx/clZ8RyUmF6XqPjqOmcLDNdAFga IeMF26+BwmV+on5YDxUcpXgWf5KY85Au+L8367UnXTZEnCEKvvlsoJ7t0ItvGlNQ hvLe2xrYVUDxdR8XUBM5Du5FKdzQ93f2KNUm6EO3Qt88aqfolwEQFs5ZS8IoEGjl AQn+LvDX//rPBl2lZe0xIrvRMBi//mBxjE6anHdZA7G4c6G43GqZLmHuXaxEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:in-reply-to:message-id:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=9wlkAexnbuaFPyXNo0Tm7XJLG6oDsuopQJVYzP198NA=; b=NpNYctIC +leoBZIeyomyV9jhQQGF+f39WDz07rsofo2C/RY8K2TswRntalsHXggAQa5R+SKu 3+ki0mV6LzGS8CLcCklIcDoeDIG9GAW/7GebJzqksxKRIVWZhW+eCVUwzR4iYFpr GWtdwMB7wz2D3tO1LQZ5UX2D/UBe8Z9LKj2FXBONI0fmFs9/gJZopUXLFJ8fxxKj 6skWQVPd5LEht9dqPOVPi0Ta1f53TS120u2sgW+P5ULiQtNe8pAFkN4eQZ8CrhxO 5a3jOrCdsRvBUgrsDCiI6Lm0tT3yfeq60QHK45THybOp9u3I3KBUDp9jHvipHdvQ HYedvV+I7h7Buw== X-ME-Sender: X-ME-Proxy: Received: from euler.miltonslab.com (unknown [58.170.231.49]) by mail.messagingengine.com (Postfix) with ESMTPA id B5EDEE4750 for ; Sat, 17 Nov 2018 03:09:22 -0500 (EST) Received: (from root@localhost) by euler.miltonslab.com (8.15.2/8.15.2) id wAH84AM1001846; Sat, 17 Nov 2018 08:04:11 GMT (envelope-from miltonott) Date: Sat, 17 Nov 2018 08:04:11 GMT From: miltonott Message-Id: <201811170804.wAH84AM1001846@euler.miltonslab.com> To: freebsd-hackers@freebsd.org Subject: Re: Adding support for MosChip 9912 PCIe (serial/parallel) cards In-Reply-To: 20180306072727.GA86364@bali X-Rspamd-Queue-Id: C5BF78032F X-Spamd-Result: default: False [-5.68 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[fastmail.com,messagingengine.com]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.25]; FREEMAIL_FROM(0.00)[fastmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-3.59)[ip: (-9.28), ipnet: 64.147.123.0/24(-4.64), asn: 11403(-3.91), country: US(-0.10)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; MX_GOOD(-0.01)[in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; RCVD_IN_DNSWL_LOW(-0.10)[25.123.147.64.list.dnswl.org : 127.0.5.1]; RECEIVED_SPAMHAUS_PBL(0.00)[49.231.170.58.zen.spamhaus.org : 127.0.0.11]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-Mailman-Approved-At: Sat, 17 Nov 2018 11:47:29 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2018 08:09:34 -0000 >I am now using this diff to access the MCS9912. I am (mis)using >puc to initialise whatever is needed for the printer port to work >and let ppc attach to puc. As puc does not attach to single port >devices, I have removed this check. uart works by simply adding >the device. This is all quite ugly but it works... My lord, may I please see the device.hints file you are now using, or are you still having to disable some entries. I hope this email finds you in good spirit and health. From owner-freebsd-hackers@freebsd.org Sat Nov 17 21:44:50 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 110BD1107378 for ; Sat, 17 Nov 2018 21:44:50 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [96.73.9.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4468170E for ; Sat, 17 Nov 2018 21:44:49 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id CEC70D21C7 for ; Sat, 17 Nov 2018 14:45:25 -0700 (MST) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t0ROcv3YaN54 for ; Sat, 17 Nov 2018 14:45:25 -0700 (MST) Received: from photon.int.bluestop.org (gw.bluestop.org [96.73.9.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA for ; Sat, 17 Nov 2018 14:45:25 -0700 (MST) From: Rebecca Cran To: freebsd-hackers Hackers Subject: 13-CURRENT: several GB swap being used despite plenty of free RAM Date: Sat, 17 Nov 2018 14:44:41 -0700 Message-ID: <1748688.u6MfGjpqfb@photon.int.bluestop.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Rspamd-Queue-Id: 1C4468170E X-Spamd-Result: default: False [-4.67 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bluestop.org]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bluestop.org:+]; DMARC_POLICY_ALLOW(-0.50)[bluestop.org,quarantine]; MX_GOOD(-0.01)[mail.bluestop.org]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; CTE_CASE(0.50)[]; ASN(0.00)[asn:7922, ipnet:96.64.0.0/11, country:US]; IP_SCORE(-3.18)[ip: (-9.81), ipnet: 96.64.0.0/11(-4.89), asn: 7922(-1.13), country: US(-0.10)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2018 21:44:50 -0000 I'm running 13-CURRENT from a few days ago. I noticed the system using several GB of swap despite having 90GB RAM still free. I know FreeBSD will use *some*, but 3450MB seems excessive when there's still 90GB RAM free. CPU: 0.1% user, 0.0% nice, 0.0% system, 0.0% interrupt, 99.8% idle Mem: 3392M Active, 5489M Inact, 390M Laundry, 25G Wired, 90G Free ARC: 19G Total, 8080M MFU, 9242M MRU, 64K Anon, 197M Header, 1570M Other 15G Compressed, 26G Uncompressed, 1.73:1 Ratio Swap: 8192M Total, 3450M Used, 4742M Free, 42% Inuse, 36K In Quitting firefox caused the swap usage to drop to just 460MB. I don't understand why it would decide to swap out so much, especially since I have vm.swap_idle_enabled set to 0. -- Rebecca From owner-freebsd-hackers@freebsd.org Sat Nov 17 22:21:36 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A54841108322 for ; Sat, 17 Nov 2018 22:21:36 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [96.73.9.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1719D8323E for ; Sat, 17 Nov 2018 22:21:35 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id BAD08D220B for ; Sat, 17 Nov 2018 15:22:18 -0700 (MST) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M68rjK8dRLnu for ; Sat, 17 Nov 2018 15:22:18 -0700 (MST) Received: from photon.int.bluestop.org (gw.bluestop.org [96.73.9.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA for ; Sat, 17 Nov 2018 15:22:18 -0700 (MST) From: Rebecca Cran To: freebsd-hackers@freebsd.org Subject: Re: 13-CURRENT: several GB swap being used despite plenty of free RAM Date: Sat, 17 Nov 2018 15:21:33 -0700 Message-ID: <2030527.5gTYqTD1LS@photon.int.bluestop.org> In-Reply-To: <1748688.u6MfGjpqfb@photon.int.bluestop.org> References: <1748688.u6MfGjpqfb@photon.int.bluestop.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Rspamd-Queue-Id: 1719D8323E X-Spamd-Result: default: False [-4.68 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bluestop.org]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[bluestop.org:+]; DMARC_POLICY_ALLOW(-0.50)[bluestop.org,quarantine]; MX_GOOD(-0.01)[cached: mail.bluestop.org]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; CTE_CASE(0.50)[]; ASN(0.00)[asn:7922, ipnet:96.64.0.0/11, country:US]; IP_SCORE(-3.19)[ip: (-9.81), ipnet: 96.64.0.0/11(-4.89), asn: 7922(-1.17), country: US(-0.10)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2018 22:21:36 -0000 On Saturday, 17 November 2018 14:44:41 MST Rebecca Cran via freebsd-hackers wrote: > Quitting firefox caused the swap usage to drop to just 460MB. I don't > understand why it would decide to swap out so much, especially since I have > vm.swap_idle_enabled set to 0. Of course it was because just before looking at top, I'd been running something that used up all the memory. I'd run "grep -rHn" and it had wanted to use over 120GB memory, which caused all the swapouts. -- Rebecca From owner-freebsd-hackers@freebsd.org Sat Nov 17 22:21:49 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF8691108348 for ; Sat, 17 Nov 2018 22:21:49 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E566C83263 for ; Sat, 17 Nov 2018 22:21:48 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id wAHLqRqK061071 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 17 Nov 2018 22:52:27 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id wAHLqMJY061068; Sat, 17 Nov 2018 22:52:22 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) Date: Sat, 17 Nov 2018 22:52:22 +0100 (CET) From: Wojciech Puchar To: Rebecca Cran cc: freebsd-hackers Hackers Subject: Re: 13-CURRENT: several GB swap being used despite plenty of free RAM In-Reply-To: <1748688.u6MfGjpqfb@photon.int.bluestop.org> Message-ID: References: <1748688.u6MfGjpqfb@photon.int.bluestop.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: E566C83263 X-Spamd-Result: default: False [0.09 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_SPAM_SHORT(0.40)[0.400,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[puchar.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[puchar.net]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; IP_SCORE(0.00)[country: PL(0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2018 22:21:50 -0000 freebsd will not swap with that lots of free ram. but it's 90GB free NOW, how about before? If something got swapped it isn't read back just because there is free memory but when it will be needed. On Sat, 17 Nov 2018, Rebecca Cran via freebsd-hackers wrote: > I'm running 13-CURRENT from a few days ago. I noticed the system using several > GB of swap despite having 90GB RAM still free. I know FreeBSD will use *some*, > but 3450MB seems excessive when there's still 90GB RAM free. > > CPU: 0.1% user, 0.0% nice, 0.0% system, 0.0% interrupt, 99.8% idle > Mem: 3392M Active, 5489M Inact, 390M Laundry, 25G Wired, 90G Free > ARC: 19G Total, 8080M MFU, 9242M MRU, 64K Anon, 197M Header, 1570M Other > 15G Compressed, 26G Uncompressed, 1.73:1 Ratio > Swap: 8192M Total, 3450M Used, 4742M Free, 42% Inuse, 36K In > > Quitting firefox caused the swap usage to drop to just 460MB. I don't > understand why it would decide to swap out so much, especially since I have > vm.swap_idle_enabled set to 0. > > -- > Rebecca > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@freebsd.org Sat Nov 17 22:22:53 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D49A11083CD for ; Sat, 17 Nov 2018 22:22:53 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [96.73.9.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE51883427 for ; Sat, 17 Nov 2018 22:22:52 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id B1A2DD2221; Sat, 17 Nov 2018 15:23:35 -0700 (MST) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VvCCfLUOjanI; Sat, 17 Nov 2018 15:23:35 -0700 (MST) Received: from photon.int.bluestop.org (gw.bluestop.org [96.73.9.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA; Sat, 17 Nov 2018 15:23:35 -0700 (MST) From: Rebecca Cran To: Wojciech Puchar Cc: freebsd-hackers Hackers Subject: Re: 13-CURRENT: several GB swap being used despite plenty of free RAM Date: Sat, 17 Nov 2018 15:22:51 -0700 Message-ID: <3445599.DPmmpGpFb9@photon.int.bluestop.org> In-Reply-To: References: <1748688.u6MfGjpqfb@photon.int.bluestop.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Rspamd-Queue-Id: EE51883427 X-Spamd-Result: default: False [-4.68 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bluestop.org]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bluestop.org:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bluestop.org,quarantine]; MX_GOOD(-0.01)[cached: mail.bluestop.org]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; CTE_CASE(0.50)[]; ASN(0.00)[asn:7922, ipnet:96.64.0.0/11, country:US]; IP_SCORE(-3.20)[ip: (-9.81), ipnet: 96.64.0.0/11(-4.89), asn: 7922(-1.22), country: US(-0.10)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2018 22:22:53 -0000 On Saturday, 17 November 2018 14:52:22 MST Wojciech Puchar wrote: > freebsd will not swap with that lots of free ram. > but it's 90GB free NOW, how about before? > > If something got swapped it isn't read back just because there is free > memory but when it will be needed. That was it: just before, I'd run grep and canceled it after it reached about 120GB memory usage! -- Rebecca From owner-freebsd-hackers@freebsd.org Sat Nov 17 22:53:58 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B7EA1109780 for ; Sat, 17 Nov 2018 22:53:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1623F845EC for ; Sat, 17 Nov 2018 22:53:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id O9THgSpsAyqMYO9TIgO3Lr; Sat, 17 Nov 2018 15:53:49 -0700 X-Authority-Analysis: v=2.3 cv=CvFujUwD c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=JHtHm7312UAA:10 a=-mWiuh9oAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=Xu-Avd0tElVI5LjkrIwA:9 a=CjuIK1q_8ugA:10 a=zQL-nbigMlujGkG7wPSG:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id C25AB420; Sat, 17 Nov 2018 14:53:46 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id wAHMrkoW003190; Sat, 17 Nov 2018 14:53:46 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id wAHMrkgl003187; Sat, 17 Nov 2018 14:53:46 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201811172253.wAHMrkgl003187@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Rebecca Cran cc: freebsd-hackers Hackers Subject: Re: 13-CURRENT: several GB swap being used despite plenty of free RAM In-Reply-To: Message from Rebecca Cran via freebsd-hackers of "Sat, 17 Nov 2018 14:44:41 -0700." <1748688.u6MfGjpqfb@photon.int.bluestop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 17 Nov 2018 14:53:46 -0800 X-CMAE-Envelope: MS4wfMYSL5LB6+4hbwVLYZyJSS53EVpi4vdI+b97mPAxBer5KeoSXT5atQZaJqSxAfT6qtc9fADfMC0ys9WJ/JqLh69A5bbB0wUFQk2CV70pqjVmkb4Dgp46 oEdOgaDyEJGK9fwFXId4nLgZ7zA4mPS2GZzWD0xMp+jvuLV1AytmUKhT7rxtIHNpKk222sE/0PrFNtWf6sO1oiIWXxA4/Z2SPOLAE8v4yEZycFPQ028T1Ma9 X-Rspamd-Queue-Id: 1623F845EC X-Spamd-Result: default: False [-2.68 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[spqr.komquats.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.02)[ip: (-5.63), ipnet: 64.59.128.0/20(-2.43), asn: 6327(-1.94), country: CA(-0.10)]; RCVD_IN_DNSWL_LOW(-0.10)[139.136.59.64.list.dnswl.org : 127.0.5.1] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2018 22:53:58 -0000 In message <1748688.u6MfGjpqfb@photon.int.bluestop.org>, Rebecca Cran via freeb sd-hackers writes: > I'm running 13-CURRENT from a few days ago. I noticed the system using severa > l > GB of swap despite having 90GB RAM still free. I know FreeBSD will use *some* > , > but 3450MB seems excessive when there's still 90GB RAM free. > > CPU: 0.1% user, 0.0% nice, 0.0% system, 0.0% interrupt, 99.8% idle > Mem: 3392M Active, 5489M Inact, 390M Laundry, 25G Wired, 90G Free > ARC: 19G Total, 8080M MFU, 9242M MRU, 64K Anon, 197M Header, 1570M Other > 15G Compressed, 26G Uncompressed, 1.73:1 Ratio > Swap: 8192M Total, 3450M Used, 4742M Free, 42% Inuse, 36K In > > Quitting firefox caused the swap usage to drop to just 460MB. I don't > understand why it would decide to swap out so much, especially since I have > vm.swap_idle_enabled set to 0. Were you by chance building any ports at the time? Or, possibly extracting a tarball? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.