}
 LPROC_SEQ_FOPS(ptlrpc_lprocfs_req_history_max);
 
-static int
-ptlrpc_lprocfs_threads_min_seq_show(struct seq_file *m, void *n)
+
+static ssize_t threads_min_show(struct kobject *kobj, struct attribute *attr,
+                               char *buf)
 {
-       struct ptlrpc_service *svc = m->private;
+       struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service,
+                                                 srv_kobj);
 
-       seq_printf(m, "%d\n", svc->srv_nthrs_cpt_init * svc->srv_ncpts);
-       return 0;
+       return sprintf(buf, "%d\n", svc->srv_nthrs_cpt_init * svc->srv_ncpts);
 }
 
-static ssize_t
-ptlrpc_lprocfs_threads_min_seq_write(struct file *file,
-                                       const char __user *buffer,
-                                       size_t count, loff_t *off)
+static ssize_t threads_min_store(struct kobject *kobj, struct attribute *attr,
+                                const char *buffer, size_t count)
 {
-       struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private;
-       int     val;
-       int     rc = lprocfs_write_helper(buffer, count, &val);
+       struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service,
+                                                 srv_kobj);
+       unsigned long val;
+       int rc = kstrtoul(buffer, 10, &val);
 
        if (rc < 0)
                return rc;
 
        return count;
 }
-LPROC_SEQ_FOPS(ptlrpc_lprocfs_threads_min);
+LUSTRE_RW_ATTR(threads_min);
 
-static int
-ptlrpc_lprocfs_threads_started_seq_show(struct seq_file *m, void *n)
+static ssize_t threads_started_show(struct kobject *kobj,
+                                   struct attribute *attr,
+                                   char *buf)
 {
-       struct ptlrpc_service *svc = m->private;
+       struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service,
+                                                 srv_kobj);
        struct ptlrpc_service_part *svcpt;
-       int     total = 0;
-       int     i;
+       int total = 0;
+       int i;
 
        ptlrpc_service_for_each_part(svcpt, i, svc)
                total += svcpt->scp_nthrs_running;
 
-       seq_printf(m, "%d\n", total);
-       return 0;
+       return sprintf(buf, "%d\n", total);
 }
-LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_threads_started);
+LUSTRE_RO_ATTR(threads_started);
 
-static int
-ptlrpc_lprocfs_threads_max_seq_show(struct seq_file *m, void *n)
+static ssize_t threads_max_show(struct kobject *kobj, struct attribute *attr,
+                               char *buf)
 {
-       struct ptlrpc_service *svc = m->private;
+       struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service,
+                                                 srv_kobj);
 
-       seq_printf(m, "%d\n", svc->srv_nthrs_cpt_limit * svc->srv_ncpts);
-       return 0;
+       return sprintf(buf, "%d\n", svc->srv_nthrs_cpt_limit * svc->srv_ncpts);
 }
 
-static ssize_t
-ptlrpc_lprocfs_threads_max_seq_write(struct file *file,
-                               const char __user *buffer,
-                               size_t count, loff_t *off)
+static ssize_t threads_max_store(struct kobject *kobj, struct attribute *attr,
+                                const char *buffer, size_t count)
 {
-       struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private;
-       int     val;
-       int     rc = lprocfs_write_helper(buffer, count, &val);
+       struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service,
+                                                 srv_kobj);
+       unsigned long val;
+       int rc = kstrtoul(buffer, 10, &val);
 
        if (rc < 0)
                return rc;
 
        return count;
 }
-LPROC_SEQ_FOPS(ptlrpc_lprocfs_threads_max);
+LUSTRE_RW_ATTR(threads_max);
 
 /**
  * \addtogoup nrs
 LPROC_SEQ_FOPS(ptlrpc_lprocfs_hp_ratio);
 
 static struct attribute *ptlrpc_svc_attrs[] = {
+       &lustre_attr_threads_min.attr,
+       &lustre_attr_threads_started.attr,
+       &lustre_attr_threads_max.attr,
        NULL,
 };
 
                {.name       = "req_buffer_history_max",
                 .fops       = &ptlrpc_lprocfs_req_history_max_fops,
                 .data       = svc},
-               {.name       = "threads_min",
-                .fops       = &ptlrpc_lprocfs_threads_min_fops,
-                .data       = svc},
-               {.name       = "threads_max",
-                .fops       = &ptlrpc_lprocfs_threads_max_fops,
-                .data       = svc},
-               {.name       = "threads_started",
-                .fops       = &ptlrpc_lprocfs_threads_started_fops,
-                .data       = svc},
                {.name       = "timeouts",
                 .fops       = &ptlrpc_lprocfs_timeouts_fops,
                 .data       = svc},