get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/57989/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 57989,
    "url": "http://patches.dpdk.org/api/patches/57989/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/156682708634.28714.543470193614987025.stgit@jrharri1-skx/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<156682708634.28714.543470193614987025.stgit@jrharri1-skx>",
    "list_archive_url": "https://inbox.dpdk.org/dev/156682708634.28714.543470193614987025.stgit@jrharri1-skx",
    "date": "2019-08-26T13:44:46",
    "name": "[v5] eal: use memzone to share tsc hz with secondary processes",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c5cd46eb299c3d102b2af970cec76ddc92440952",
    "submitter": {
        "id": 84,
        "url": "http://patches.dpdk.org/api/people/84/?format=api",
        "name": "Harris, James R",
        "email": "james.r.harris@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/156682708634.28714.543470193614987025.stgit@jrharri1-skx/mbox/",
    "series": [
        {
            "id": 6125,
            "url": "http://patches.dpdk.org/api/series/6125/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6125",
            "date": "2019-08-26T13:44:46",
            "name": "[v5] eal: use memzone to share tsc hz with secondary processes",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/6125/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/57989/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/57989/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 07F3B1C0BF;\n\tMon, 26 Aug 2019 22:49:53 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 030091C0AD\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 22:49:50 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Aug 2019 13:49:49 -0700",
            "from jrharri1-skx.ch.intel.com (HELO [127.0.1.1])\n\t([143.182.137.73])\n\tby FMSMGA003.fm.intel.com with ESMTP; 26 Aug 2019 13:49:49 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,433,1559545200\"; d=\"scan'208\";a=\"187709438\"",
        "From": "Jim Harris <james.r.harris@intel.com>",
        "To": "dev@dpdk.org, bruce.richardson@intel.com, anatoly.burakov@intel.com",
        "Date": "Mon, 26 Aug 2019 06:44:46 -0700",
        "Message-ID": "<156682708634.28714.543470193614987025.stgit@jrharri1-skx>",
        "In-Reply-To": "<156646334762.14099.13593080473257757748.stgit@jrharri1-skx>",
        "References": "<156646334762.14099.13593080473257757748.stgit@jrharri1-skx>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Subject": "[dpdk-dev] [PATCH v5] eal: use memzone to share tsc hz with\n\tsecondary processes",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Ideally, get_tsc_freq_arch() is able to provide the\nTSC rate using arch-specific means.  When that is not\npossible, DPDK reverts to calculating the TSC rate with\na 100ms nanosleep or 1s sleep.  The latter occurs more\nfrequently in VMs which often do not have access to the\ndata they need from arch-specific means (CPUID leaf 0x15\nor MSR 0xCE on x86).\n\nIn secondary processes, the extra 100ms is especially\nnoticeable and consumes the bulk of rte_eal_init()\nexecution time.  To resolve this extra delay, have\nthe primary process put the TSC rate into a shared\nmemory region that the secondary process can lookup.\n\nReduces rte_eal_init() execution time in a secondary\nprocess from 165ms to 66ms on my test system.\n\nSigned-off-by: Jim Harris <james.r.harris@intel.com>\n---\n lib/librte_eal/common/eal_common_timer.c |   20 ++++++++++++++++++--\n 1 file changed, 18 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c\nindex 145543de7..2aeab6462 100644\n--- a/lib/librte_eal/common/eal_common_timer.c\n+++ b/lib/librte_eal/common/eal_common_timer.c\n@@ -15,9 +15,12 @@\n #include <rte_log.h>\n #include <rte_cycles.h>\n #include <rte_pause.h>\n+#include <rte_memzone.h>\n \n #include \"eal_private.h\"\n \n+static const char *MZ_RTE_TSC_FREQ = \"rte_tsc_freq\";\n+\n /* The frequency of the RDTSC timer resolution */\n static uint64_t eal_tsc_resolution_hz;\n \n@@ -77,9 +80,16 @@ estimate_tsc_freq(void)\n void\n set_tsc_freq(void)\n {\n-\tuint64_t freq;\n+\tconst struct rte_memzone *mz;\n+\tuint64_t freq = 0;\n \n-\tfreq = get_tsc_freq_arch();\n+\tif (rte_eal_process_type() == RTE_PROC_SECONDARY) {\n+\t\tmz = rte_memzone_lookup(MZ_RTE_TSC_FREQ);\n+\t\tif (mz != NULL)\n+\t\t\tfreq = *(uint64_t *)mz->addr;\n+\t}\n+\tif (!freq)\n+\t\tfreq = get_tsc_freq_arch();\n \tif (!freq)\n \t\tfreq = get_tsc_freq();\n \tif (!freq)\n@@ -87,6 +97,12 @@ set_tsc_freq(void)\n \n \tRTE_LOG(DEBUG, EAL, \"TSC frequency is ~%\" PRIu64 \" KHz\\n\", freq / 1000);\n \teal_tsc_resolution_hz = freq;\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\tmz = rte_memzone_reserve(MZ_RTE_TSC_FREQ, sizeof(uint64_t),\n+\t\t\t\t\t SOCKET_ID_ANY, 0);\n+\t\tif (mz != NULL)\n+\t\t\t*(uint64_t *)mz->addr = freq;\n+\t}\n }\n \n void rte_delay_us_callback_register(void (*userfunc)(unsigned int))\n",
    "prefixes": [
        "v5"
    ]
}