From owner-freebsd-hackers@freebsd.org Sun Oct 7 04:21:04 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 30B2010AFA9B for ; Sun, 7 Oct 2018 04:21:04 +0000 (UTC) (envelope-from cneirabustos@gmail.com) Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) (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 C025E72595 for ; Sun, 7 Oct 2018 04:21:03 +0000 (UTC) (envelope-from cneirabustos@gmail.com) Received: by mail-vs1-xe33.google.com with SMTP id g201so9626132vsd.12 for ; Sat, 06 Oct 2018 21:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=wzaB+psnzqDCJMtHEYWRYAIfEEctjQ51TEjR7yGBb0o=; b=NPfI7olEvaBwwdcBJYoPrOzXJnmZ98I1U9RB0lM/PAn3sygHJtdDjjxHxtXAg/nlq9 LBOZuB4jHdSI3UMwpPRrYuRQbkA8Fc5lhFoJb4RitCClT1EDyYWSw45CqPhq+q5kL14o sSa4NYonqckEPXiLm2wVsTiAyUUIKcr2xyiLAJk5f6Fms/xOn/uWET4aO/Fj6sxejzm2 KZIcAMoXLxE9nzAaZsGFb8xeBK1XYlU1VS8DLGd2XEKbNS09fCodL9Fz1nFVqVboIxvY NFaL5q/BXaDP/6QWT7aY7y2k4xEMqHqpXt+13nqIMsIBdtu2vv7cKKE1xjqtD215msPW JyHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wzaB+psnzqDCJMtHEYWRYAIfEEctjQ51TEjR7yGBb0o=; b=TbWJYKTTExBW7tndpiNp2MrbhdD7LC1moN/eUUBnNLA5xaysBvBSRynnGD9jz0LTC9 9YYl1of4br/uRa7IELeC8B0/IAzwfurgajQO2cGcpHa3ewrP6pW8OwDMht8+e5U05gSg 0oIu8Y5Gn3kS43jtIDz2o6So8LXzOn+SEgcY9cKm0eQ1pUfDfPiCAx3TYEjTt66BcER9 XlxvEHgpvWEtuKJDTw8jkqtO8YagR0SOXy8VOHbZzOpC6tvrIoVe/q0leEUBdWg33ZoX a1BC/q9M69Xm9TlCcsM6/4aIPotp8ruYTTZDulg2Mun7JFxEiX02ACl6gALigEhLDqZz KCQQ== X-Gm-Message-State: ABuFfohF6T5U7Z0U2+FfmBlXRa1PTqT0UWnVlYTLU4OE1b7v/WRERXzO gIO3VYmPsiyoIafUG1L0s6EFCPVdVgrwaPrzSv3utP460Xw= X-Google-Smtp-Source: ACcGV635mgPtBeGNvOqhEV8/f2C+nbYZB/q4gNSXsieY0l67D7NuPomLRmT9jOEhTNSDm44imk2puDIMmkI8z1vh3T0= X-Received: by 2002:a67:468a:: with SMTP id a10mr6885464vsg.202.1538886062673; Sat, 06 Oct 2018 21:21:02 -0700 (PDT) MIME-Version: 1.0 From: carlos antonio neira bustos Date: Sun, 7 Oct 2018 01:20:50 -0300 Message-ID: Subject: vm statistics per jail To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2018 04:21:04 -0000 Hello, Hackers, I have added mib member vm.vmtotal to be part of a prison with the intent that each jail could report the correct memory usage using their vm counters. Unfortunately for me, I found that t_free depends on the global vmmeter counters, so I'm trying to add those as well to the prison struct, that will make consumers of those counters to report the correct information inside a jail. The problem so far trying to add vmeter is when I'm trying to determine to which jail a vm_page_t belongs to using vm_pages_t's object cred struct I'm getting a kernel panic due to a page fault. I have modified vm_phys_freecnt_adj(vm_page_t m, int adj) from /usr/src/sys/vm/vm_phys.h to increment the vmeter.v_free_count on the cr_prison that's belongs to vm_page_t. The panic does not produce a dump, so I'm unable to debug the fault. My rc.conf contains dumpdev="AUTO" so I think it should produce a dump or could it be that the panic happens to early? Is it possible to obtain to which cr_prison a vm_page_t belongs to ?. Bests