* [PATCH] perf/x86/intel: Extend the ref-cycles event to GP counters
@ 2023-09-11 14:41 kan.liang
2023-09-12 7:31 ` [tip: perf/core] " tip-bot2 for Kan Liang
2023-09-27 4:47 ` [PATCH] " Stephane Eranian
0 siblings, 2 replies; 4+ messages in thread
From: kan.liang @ 2023-09-11 14:41 UTC (permalink / raw
To: peterz, mingo, linux-kernel; +Cc: eranian, ak, Kan Liang
From: Kan Liang <kan.liang@linux.intel.com>
The current ref-cycles event is only available on the fixed counter 2.
Starting from the GLC and GRT core, the architectural UnHalted Reference
Cycles event (0x013c) which is available on general-purpose counters
can collect the exact same events as the fixed counter 2.
Update the mapping of ref-cycles to 0x013c. So the ref-cycles can be
available on both fixed counter 2 and general-purpose counters.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
arch/x86/events/intel/core.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index e1543d6dc48a..a08f794a0e79 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -211,6 +211,14 @@ static struct event_constraint intel_slm_event_constraints[] __read_mostly =
EVENT_CONSTRAINT_END
};
+static struct event_constraint intel_grt_event_constraints[] __read_mostly = {
+ FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
+ FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
+ FIXED_EVENT_CONSTRAINT(0x0300, 2), /* pseudo CPU_CLK_UNHALTED.REF */
+ FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
+ EVENT_CONSTRAINT_END
+};
+
static struct event_constraint intel_skl_event_constraints[] = {
FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
@@ -314,6 +322,7 @@ static struct event_constraint intel_glc_event_constraints[] = {
FIXED_EVENT_CONSTRAINT(0x0100, 0), /* INST_RETIRED.PREC_DIST */
FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
+ FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
FIXED_EVENT_CONSTRAINT(0x0400, 3), /* SLOTS */
METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_RETIRING, 0),
METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_BAD_SPEC, 1),
@@ -5983,6 +5992,12 @@ static __always_inline int intel_pmu_init_hybrid(enum hybrid_pmu_type pmus)
return 0;
}
+static __always_inline void intel_pmu_ref_cycles_ext(void)
+{
+ if (!(x86_pmu.events_maskl & (INTEL_PMC_MSK_FIXED_REF_CYCLES >> INTEL_PMC_IDX_FIXED)))
+ intel_perfmon_event_map[PERF_COUNT_HW_REF_CPU_CYCLES] = 0x013c;
+}
+
static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
{
x86_pmu.late_ack = true;
@@ -6005,6 +6020,8 @@ static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
memcpy(hybrid_var(pmu, hw_cache_extra_regs), glc_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
hybrid(pmu, event_constraints) = intel_glc_event_constraints;
hybrid(pmu, pebs_constraints) = intel_glc_pebs_event_constraints;
+
+ intel_pmu_ref_cycles_ext();
}
static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
@@ -6021,9 +6038,11 @@ static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
memcpy(hybrid_var(pmu, hw_cache_event_ids), glp_hw_cache_event_ids, sizeof(hw_cache_event_ids));
memcpy(hybrid_var(pmu, hw_cache_extra_regs), tnt_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
hybrid_var(pmu, hw_cache_event_ids)[C(ITLB)][C(OP_READ)][C(RESULT_ACCESS)] = -1;
- hybrid(pmu, event_constraints) = intel_slm_event_constraints;
+ hybrid(pmu, event_constraints) = intel_grt_event_constraints;
hybrid(pmu, pebs_constraints) = intel_grt_pebs_event_constraints;
hybrid(pmu, extra_regs) = intel_grt_extra_regs;
+
+ intel_pmu_ref_cycles_ext();
}
__init int intel_pmu_init(void)
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: perf/core] perf/x86/intel: Extend the ref-cycles event to GP counters
2023-09-11 14:41 [PATCH] perf/x86/intel: Extend the ref-cycles event to GP counters kan.liang
@ 2023-09-12 7:31 ` tip-bot2 for Kan Liang
2023-09-27 4:47 ` [PATCH] " Stephane Eranian
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Kan Liang @ 2023-09-12 7:31 UTC (permalink / raw
To: linux-tip-commits; +Cc: Kan Liang, Ingo Molnar, x86, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: ffbe4ab0beda55b5c467aa3d95ca14db75a84717
Gitweb: https://git.kernel.org/tip/ffbe4ab0beda55b5c467aa3d95ca14db75a84717
Author: Kan Liang <kan.liang@linux.intel.com>
AuthorDate: Mon, 11 Sep 2023 07:41:38 -07:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 12 Sep 2023 08:22:24 +02:00
perf/x86/intel: Extend the ref-cycles event to GP counters
The current ref-cycles event is only available on the fixed counter 2.
Starting from the GLC and GRT core, the architectural UnHalted Reference
Cycles event (0x013c) which is available on general-purpose counters
can collect the exact same events as the fixed counter 2.
Update the mapping of ref-cycles to 0x013c. So the ref-cycles can be
available on both fixed counter 2 and general-purpose counters.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230911144139.2354015-1-kan.liang@linux.intel.com
---
arch/x86/events/intel/core.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index e1543d6..a08f794 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -211,6 +211,14 @@ static struct event_constraint intel_slm_event_constraints[] __read_mostly =
EVENT_CONSTRAINT_END
};
+static struct event_constraint intel_grt_event_constraints[] __read_mostly = {
+ FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
+ FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
+ FIXED_EVENT_CONSTRAINT(0x0300, 2), /* pseudo CPU_CLK_UNHALTED.REF */
+ FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
+ EVENT_CONSTRAINT_END
+};
+
static struct event_constraint intel_skl_event_constraints[] = {
FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
@@ -314,6 +322,7 @@ static struct event_constraint intel_glc_event_constraints[] = {
FIXED_EVENT_CONSTRAINT(0x0100, 0), /* INST_RETIRED.PREC_DIST */
FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
+ FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
FIXED_EVENT_CONSTRAINT(0x0400, 3), /* SLOTS */
METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_RETIRING, 0),
METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_BAD_SPEC, 1),
@@ -5983,6 +5992,12 @@ static __always_inline int intel_pmu_init_hybrid(enum hybrid_pmu_type pmus)
return 0;
}
+static __always_inline void intel_pmu_ref_cycles_ext(void)
+{
+ if (!(x86_pmu.events_maskl & (INTEL_PMC_MSK_FIXED_REF_CYCLES >> INTEL_PMC_IDX_FIXED)))
+ intel_perfmon_event_map[PERF_COUNT_HW_REF_CPU_CYCLES] = 0x013c;
+}
+
static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
{
x86_pmu.late_ack = true;
@@ -6005,6 +6020,8 @@ static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
memcpy(hybrid_var(pmu, hw_cache_extra_regs), glc_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
hybrid(pmu, event_constraints) = intel_glc_event_constraints;
hybrid(pmu, pebs_constraints) = intel_glc_pebs_event_constraints;
+
+ intel_pmu_ref_cycles_ext();
}
static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
@@ -6021,9 +6038,11 @@ static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
memcpy(hybrid_var(pmu, hw_cache_event_ids), glp_hw_cache_event_ids, sizeof(hw_cache_event_ids));
memcpy(hybrid_var(pmu, hw_cache_extra_regs), tnt_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
hybrid_var(pmu, hw_cache_event_ids)[C(ITLB)][C(OP_READ)][C(RESULT_ACCESS)] = -1;
- hybrid(pmu, event_constraints) = intel_slm_event_constraints;
+ hybrid(pmu, event_constraints) = intel_grt_event_constraints;
hybrid(pmu, pebs_constraints) = intel_grt_pebs_event_constraints;
hybrid(pmu, extra_regs) = intel_grt_extra_regs;
+
+ intel_pmu_ref_cycles_ext();
}
__init int intel_pmu_init(void)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf/x86/intel: Extend the ref-cycles event to GP counters
2023-09-11 14:41 [PATCH] perf/x86/intel: Extend the ref-cycles event to GP counters kan.liang
2023-09-12 7:31 ` [tip: perf/core] " tip-bot2 for Kan Liang
@ 2023-09-27 4:47 ` Stephane Eranian
2023-10-02 15:08 ` Liang, Kan
1 sibling, 1 reply; 4+ messages in thread
From: Stephane Eranian @ 2023-09-27 4:47 UTC (permalink / raw
To: kan.liang; +Cc: peterz, mingo, linux-kernel, ak
On Mon, Sep 11, 2023 at 7:41 AM <kan.liang@linux.intel.com> wrote:
>
> From: Kan Liang <kan.liang@linux.intel.com>
>
> The current ref-cycles event is only available on the fixed counter 2.
> Starting from the GLC and GRT core, the architectural UnHalted Reference
> Cycles event (0x013c) which is available on general-purpose counters
> can collect the exact same events as the fixed counter 2.
>
> Update the mapping of ref-cycles to 0x013c. So the ref-cycles can be
> available on both fixed counter 2 and general-purpose counters.
>
> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> ---
> arch/x86/events/intel/core.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
> index e1543d6dc48a..a08f794a0e79 100644
> --- a/arch/x86/events/intel/core.c
> +++ b/arch/x86/events/intel/core.c
> @@ -211,6 +211,14 @@ static struct event_constraint intel_slm_event_constraints[] __read_mostly =
> EVENT_CONSTRAINT_END
> };
>
> +static struct event_constraint intel_grt_event_constraints[] __read_mostly = {
> + FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
> + FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
> + FIXED_EVENT_CONSTRAINT(0x0300, 2), /* pseudo CPU_CLK_UNHALTED.REF */
> + FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
> + EVENT_CONSTRAINT_END
> +};
> +
> static struct event_constraint intel_skl_event_constraints[] = {
> FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
> FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
> @@ -314,6 +322,7 @@ static struct event_constraint intel_glc_event_constraints[] = {
> FIXED_EVENT_CONSTRAINT(0x0100, 0), /* INST_RETIRED.PREC_DIST */
> FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
> FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
> + FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
I don't think that on SKL there is a REF_TSC_P. It only appears on
SPR. The encoding exists on SKL
but it counts REF_XCLK which I think counts something different. Please check.
> FIXED_EVENT_CONSTRAINT(0x0400, 3), /* SLOTS */
> METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_RETIRING, 0),
> METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_BAD_SPEC, 1),
> @@ -5983,6 +5992,12 @@ static __always_inline int intel_pmu_init_hybrid(enum hybrid_pmu_type pmus)
> return 0;
> }
>
> +static __always_inline void intel_pmu_ref_cycles_ext(void)
> +{
> + if (!(x86_pmu.events_maskl & (INTEL_PMC_MSK_FIXED_REF_CYCLES >> INTEL_PMC_IDX_FIXED)))
> + intel_perfmon_event_map[PERF_COUNT_HW_REF_CPU_CYCLES] = 0x013c;
> +}
> +
> static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
> {
> x86_pmu.late_ack = true;
> @@ -6005,6 +6020,8 @@ static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
> memcpy(hybrid_var(pmu, hw_cache_extra_regs), glc_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
> hybrid(pmu, event_constraints) = intel_glc_event_constraints;
> hybrid(pmu, pebs_constraints) = intel_glc_pebs_event_constraints;
> +
> + intel_pmu_ref_cycles_ext();
> }
>
> static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
> @@ -6021,9 +6038,11 @@ static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
> memcpy(hybrid_var(pmu, hw_cache_event_ids), glp_hw_cache_event_ids, sizeof(hw_cache_event_ids));
> memcpy(hybrid_var(pmu, hw_cache_extra_regs), tnt_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
> hybrid_var(pmu, hw_cache_event_ids)[C(ITLB)][C(OP_READ)][C(RESULT_ACCESS)] = -1;
> - hybrid(pmu, event_constraints) = intel_slm_event_constraints;
> + hybrid(pmu, event_constraints) = intel_grt_event_constraints;
> hybrid(pmu, pebs_constraints) = intel_grt_pebs_event_constraints;
> hybrid(pmu, extra_regs) = intel_grt_extra_regs;
> +
> + intel_pmu_ref_cycles_ext();
> }
>
> __init int intel_pmu_init(void)
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf/x86/intel: Extend the ref-cycles event to GP counters
2023-09-27 4:47 ` [PATCH] " Stephane Eranian
@ 2023-10-02 15:08 ` Liang, Kan
0 siblings, 0 replies; 4+ messages in thread
From: Liang, Kan @ 2023-10-02 15:08 UTC (permalink / raw
To: Stephane Eranian; +Cc: peterz, mingo, linux-kernel, ak
On 2023-09-27 12:47 a.m., Stephane Eranian wrote:
> On Mon, Sep 11, 2023 at 7:41 AM <kan.liang@linux.intel.com> wrote:
>>
>> From: Kan Liang <kan.liang@linux.intel.com>
>>
>> The current ref-cycles event is only available on the fixed counter 2.
>> Starting from the GLC and GRT core, the architectural UnHalted Reference
>> Cycles event (0x013c) which is available on general-purpose counters
>> can collect the exact same events as the fixed counter 2.
>>
>> Update the mapping of ref-cycles to 0x013c. So the ref-cycles can be
>> available on both fixed counter 2 and general-purpose counters.
>>
>> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
>> ---
>> arch/x86/events/intel/core.c | 21 ++++++++++++++++++++-
>> 1 file changed, 20 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
>> index e1543d6dc48a..a08f794a0e79 100644
>> --- a/arch/x86/events/intel/core.c
>> +++ b/arch/x86/events/intel/core.c
>> @@ -211,6 +211,14 @@ static struct event_constraint intel_slm_event_constraints[] __read_mostly =
>> EVENT_CONSTRAINT_END
>> };
>>
>> +static struct event_constraint intel_grt_event_constraints[] __read_mostly = {
>> + FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
>> + FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
>> + FIXED_EVENT_CONSTRAINT(0x0300, 2), /* pseudo CPU_CLK_UNHALTED.REF */
>> + FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
>> + EVENT_CONSTRAINT_END
>> +};
>> +
>> static struct event_constraint intel_skl_event_constraints[] = {
>> FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
>> FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
>> @@ -314,6 +322,7 @@ static struct event_constraint intel_glc_event_constraints[] = {
>> FIXED_EVENT_CONSTRAINT(0x0100, 0), /* INST_RETIRED.PREC_DIST */
>> FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
>> FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
>> + FIXED_EVENT_CONSTRAINT(0x013c, 2), /* CPU_CLK_UNHALTED.REF_TSC_P */
>
> I don't think that on SKL there is a REF_TSC_P. It only appears on
> SPR. The encoding exists on SKL
> but it counts REF_XCLK which I think counts something different. Please check.
Right, the patch is to update the event constraint to GLC
(intel_glc_event_constraints) for SPR, not SKL.
Thanks,
Kan
>> FIXED_EVENT_CONSTRAINT(0x0400, 3), /* SLOTS */
>> METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_RETIRING, 0),
>> METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_BAD_SPEC, 1),
>> @@ -5983,6 +5992,12 @@ static __always_inline int intel_pmu_init_hybrid(enum hybrid_pmu_type pmus)
>> return 0;
>> }
>>
>> +static __always_inline void intel_pmu_ref_cycles_ext(void)
>> +{
>> + if (!(x86_pmu.events_maskl & (INTEL_PMC_MSK_FIXED_REF_CYCLES >> INTEL_PMC_IDX_FIXED)))
>> + intel_perfmon_event_map[PERF_COUNT_HW_REF_CPU_CYCLES] = 0x013c;
>> +}
>> +
>> static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
>> {
>> x86_pmu.late_ack = true;
>> @@ -6005,6 +6020,8 @@ static __always_inline void intel_pmu_init_glc(struct pmu *pmu)
>> memcpy(hybrid_var(pmu, hw_cache_extra_regs), glc_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
>> hybrid(pmu, event_constraints) = intel_glc_event_constraints;
>> hybrid(pmu, pebs_constraints) = intel_glc_pebs_event_constraints;
>> +
>> + intel_pmu_ref_cycles_ext();
>> }
>>
>> static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
>> @@ -6021,9 +6038,11 @@ static __always_inline void intel_pmu_init_grt(struct pmu *pmu)
>> memcpy(hybrid_var(pmu, hw_cache_event_ids), glp_hw_cache_event_ids, sizeof(hw_cache_event_ids));
>> memcpy(hybrid_var(pmu, hw_cache_extra_regs), tnt_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
>> hybrid_var(pmu, hw_cache_event_ids)[C(ITLB)][C(OP_READ)][C(RESULT_ACCESS)] = -1;
>> - hybrid(pmu, event_constraints) = intel_slm_event_constraints;
>> + hybrid(pmu, event_constraints) = intel_grt_event_constraints;
>> hybrid(pmu, pebs_constraints) = intel_grt_pebs_event_constraints;
>> hybrid(pmu, extra_regs) = intel_grt_extra_regs;
>> +
>> + intel_pmu_ref_cycles_ext();
>> }
>>
>> __init int intel_pmu_init(void)
>> --
>> 2.35.1
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-02 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 14:41 [PATCH] perf/x86/intel: Extend the ref-cycles event to GP counters kan.liang
2023-09-12 7:31 ` [tip: perf/core] " tip-bot2 for Kan Liang
2023-09-27 4:47 ` [PATCH] " Stephane Eranian
2023-10-02 15:08 ` Liang, Kan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).