Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory support.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Tuesday, July 1, 2008 - 2:20 am

Tejun Heo <htejun@gmail.com> writes:



Having a single tag type per directory and thus a single tag visible per
directory does prevent multiple possible visible entries.

That is we can check when we add the sd if there will be a conflict in
the directory.


That is the abstraction now.

The only difference is how we represent the set of tags.
I use and array of the valid tags.
You use a bitmap.

And array allows the lookup of the tag I am looking for before
I search for the sd.  An bitmap requires me to compare each entry.

For me that is a deal breaker.  Currently in certain pathological
cases we have scaling issues with sysctl and sysfs that we can
have enormous directories that start running slowly.  To fix
lookup performance requires that we know the full name before
we do the directory search which is the name string and the
tag.

So I having a type of tag as being of fundamental importance in
the interface now so we don't need to refactor all of the users
later.  In addition to the fact that we need the type to know
how to set the tags when mounting a superblock and when
given a new kobject to create an sd for.

We could make the types dynamic rather then a static enumeration but
that seems needless complexity for now.


Sounds good.  The only justification I can think of for ida tags is that
they are smaller, and so can keep the sysfs_dirents smaller.    Which
occasionally is a significant concern.  Still that should be an optimization
that we can apply later, as it is not a structural difference in the code.

Just to confirm.  Do you the two operations:
  mount_tag - called only when the sb is mounted 
  kobject_tag - called when we create new sd or rename an sd

Cause you to view an the tags as dynamic?

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Thu Jun 26, 1:21 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Mon Jun 30, 11:56 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Tue Jul 1, 12:50 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Tue Jul 1, 2:20 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Tue Jul 1, 5:30 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Tue Jul 1, 8:53 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Wed Jul 2, 9:49 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Wed Jul 2, 10:11 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Thu Jul 3, 5:27 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Thu Jul 3, 12:57 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Thu Jul 3, 1:08 pm)
[PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Thu Jul 3, 5:48 pm)
[PATCH 02/15] sysfs: Support for preventing unmounts., Eric W. Biederman, (Thu Jul 3, 6:07 pm)
[PATCH 03/15] sysfs: sysfs_get_dentry add a sb parameter, Eric W. Biederman, (Thu Jul 3, 6:08 pm)
[PATCH 04/15] sysfs: Implement __sysfs_get_dentry, Eric W. Biederman, (Thu Jul 3, 6:09 pm)
[PATCH 05/15] sysfs: Rename Support multiple superblocks, Eric W. Biederman, (Thu Jul 3, 6:10 pm)
[PATCH 06/15] Introduce sysfs_sd_setattr and fix sysfs_chmod, Eric W. Biederman, (Thu Jul 3, 6:11 pm)
[PATCH 08/15] sysfs: Make sysfs_mount static once again., Eric W. Biederman, (Thu Jul 3, 6:14 pm)
Re: [PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Thu Jul 3, 6:27 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Fri Jul 4, 6:31 am)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Fri Jul 4, 2:49 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Fri Jul 4, 3:00 pm)
Re: [PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Sat Jul 5, 9:42 pm)
Re: [PATCH 00/15] sysfs support for namespaces, Cornelia Huck, (Mon Jul 7, 4:41 am)
Re: [PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Mon Jul 7, 5:22 am)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Sun Jul 13, 6:54 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Tue Jul 15, 10:41 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Tue Jul 15, 11:32 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Wed Jul 16, 12:07 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Wed Jul 16, 2:09 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Fri Jul 18, 1:19 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory ..., Eric W. Biederman, (Sat Aug 2, 11:59 pm)
Re: [PATCH 09/15] sysfs: Implement sysfs tagged directory ..., Eric W. Biederman, (Tue Aug 19, 11:58 pm)
[PATCH 0/8] sysfs namespace support, Eric W. Biederman, (Wed Aug 20, 11:31 pm)
[PATCH 1/8] sysfs: Implement sysfs tagged directory support., Eric W. Biederman, (Wed Aug 20, 11:33 pm)
[PATCH 2/8] sysfs: Merge sysfs_rename_dir and sysfs_move_dir, Eric W. Biederman, (Wed Aug 20, 11:34 pm)
[PATCH 3/8] sysfs: Implement sysfs_delete_link and sysfs_r ..., Eric W. Biederman, (Wed Aug 20, 11:35 pm)
[PATCH 5/8] sysfs: Remove sysfs_create_link_nowarn, Eric W. Biederman, (Wed Aug 20, 11:36 pm)
Re: [PATCH 0/8] sysfs namespace support, David Miller, (Wed Aug 20, 11:37 pm)
[PATCH 4/8] driver core: Implement tagged directory suppor ..., Eric W. Biederman, (Wed Aug 20, 11:37 pm)
[PATCH 7/8] netns: Enable tagging for net_class directorie ..., Eric W. Biederman, (Wed Aug 20, 11:39 pm)
[PATCH 8/8] sysfs: user namespaces: fix bug with clone(CLO ..., Eric W. Biederman, (Wed Aug 20, 11:40 pm)
Re: [PATCH 1/8] sysfs: Implement sysfs tagged directory su ..., Eric W. Biederman, (Mon Oct 13, 8:20 pm)