|
@@ -84,6 +84,7 @@ int output_lines = -1;
|
|
int sort_loss;
|
|
int sort_loss;
|
|
int extended_totals;
|
|
int extended_totals;
|
|
int show_bytes;
|
|
int show_bytes;
|
|
|
|
+int unreclaim_only;
|
|
|
|
|
|
/* Debug options */
|
|
/* Debug options */
|
|
int sanity;
|
|
int sanity;
|
|
@@ -133,6 +134,7 @@ static void usage(void)
|
|
"-L|--Loss Sort by loss\n"
|
|
"-L|--Loss Sort by loss\n"
|
|
"-X|--Xtotals Show extended summary information\n"
|
|
"-X|--Xtotals Show extended summary information\n"
|
|
"-B|--Bytes Show size in bytes\n"
|
|
"-B|--Bytes Show size in bytes\n"
|
|
|
|
+ "-U|--Unreclaim Show unreclaimable slabs only\n"
|
|
"\nValid debug options (FZPUT may be combined)\n"
|
|
"\nValid debug options (FZPUT may be combined)\n"
|
|
"a / A Switch on all debug options (=FZUP)\n"
|
|
"a / A Switch on all debug options (=FZUP)\n"
|
|
"- Switch off all debug options\n"
|
|
"- Switch off all debug options\n"
|
|
@@ -569,6 +571,9 @@ static void slabcache(struct slabinfo *s)
|
|
if (strcmp(s->name, "*") == 0)
|
|
if (strcmp(s->name, "*") == 0)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ if (unreclaim_only && s->reclaim_account)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (actual_slabs == 1) {
|
|
if (actual_slabs == 1) {
|
|
report(s);
|
|
report(s);
|
|
return;
|
|
return;
|
|
@@ -1347,6 +1352,7 @@ struct option opts[] = {
|
|
{ "Loss", no_argument, NULL, 'L'},
|
|
{ "Loss", no_argument, NULL, 'L'},
|
|
{ "Xtotals", no_argument, NULL, 'X'},
|
|
{ "Xtotals", no_argument, NULL, 'X'},
|
|
{ "Bytes", no_argument, NULL, 'B'},
|
|
{ "Bytes", no_argument, NULL, 'B'},
|
|
|
|
+ { "Unreclaim", no_argument, NULL, 'U'},
|
|
{ NULL, 0, NULL, 0 }
|
|
{ NULL, 0, NULL, 0 }
|
|
};
|
|
};
|
|
|
|
|
|
@@ -1358,7 +1364,7 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
page_size = getpagesize();
|
|
page_size = getpagesize();
|
|
|
|
|
|
- while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTSN:LXB",
|
|
|
|
|
|
+ while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTSN:LXBU",
|
|
opts, NULL)) != -1)
|
|
opts, NULL)) != -1)
|
|
switch (c) {
|
|
switch (c) {
|
|
case '1':
|
|
case '1':
|
|
@@ -1439,6 +1445,9 @@ int main(int argc, char *argv[])
|
|
case 'B':
|
|
case 'B':
|
|
show_bytes = 1;
|
|
show_bytes = 1;
|
|
break;
|
|
break;
|
|
|
|
+ case 'U':
|
|
|
|
+ unreclaim_only = 1;
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
fatal("%s: Invalid option '%c'\n", argv[0], optopt);
|
|
fatal("%s: Invalid option '%c'\n", argv[0], optopt);
|
|
|
|
|