forced unmount patch

=?ks_c_5601-1987?B?wNPAusH2?= <[email protected]> Sat, 10 Sep 2005 15:06:07 +0900
Newsgroups gmane.linux.kernel.carrier-grade
Message-ID <6AC40EDF52345D498737CF9779B24DC432F9CE@email1>
This is a multi-part message in MIME format...

--===============11004486596511831==
Content-Type: multipart/alternative;
    boundary="----------=_1126332420-30756-630"
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)

This is a multi-part message in MIME format...

------------=_1126332420-30756-630
Content-Type: text/plain;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello,

=20

Attached is our forced unmount patch. This patch is the update of the fumou=
nt patch that Villalovos posted to CGL mailing list on 10/27/04. And, some =
parts of the Dave Jiang=A1=AFs patch(april 2005) are applied on the patch.

We=A1=AFve tested Dave=A1=AFs patch and found some problems. Firstly, if th=
ere are two or more processes running for a same binary file on the filesys=
tem, fumount does not work correctly. Secondly, while a process has a refer=
ence to a file, if fumount closes the file, the file is freed suddenly. Thi=
s can cause the kernel panic. The 5 second wait is not enough when a huge n=
umber of processes are accessing the filesystem.

=20

We=A1=AFve solved these problems.=20

We have done bug fix about the unmapping vmas.=20

And, to solve the second problem, a new count variable is added in the stru=
ct file. This count is increased when a system call starts and decreased wh=
en system call exits. The related system calls are file operations like rea=
d, write, seek, etc. This count makes fumount know that the file operation =
has a reference to a file. Fumount does not close the file as long as the f=
ile operation is in progress.

=20

We=A1=AFve tested our patch on ext2, ext3, and reiser fs. In addition, we=
=A1=AFve confirmed that our fumount works correctly while thousands of proc=
esses are accessing the filesystem. We=A1=AFve used AIM7 benchmark for this=
 test.

=20

There are some problems remained in this patch. When thousands of processes=
 start running and exit for a binary file on the filesystem, fumount someti=
mes causes kernel panic. We are working on this problem now.

=20

Comments or bug reports would be appreciated.

Thank you,

=20
Eun-Ji Lim
<http://www.etri.re.kr/www_05/e_etri/>=20=20
--------------
I=A1=AFm working for ETRI(Electronics and Telecommunications Research Insti=
tute) in Korea. ETRI is a non-profit government-funded research organizatio=
n established in 1976.

http://www.etri.re.kr/www_05/e_etri/ <http://www.etri.re.kr/www_05/e_etri/>=
=20

=20

=20

=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Eun-Ji Lim
Member of Engineering Staff
System Software Team / Internet Server Group
Digital Home Research Division
Electronic and Telecommunications Research Institute
=20
e-mail     : [email protected] <mailto:[email protected]>=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

=20


------------=_1126332420-30756-630
Content-Type: text/html;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dks_c_5601-1=
987">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR></HEAD>
<BODY>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT=20
size=3D2>Hello,<?xml:namespace prefix =3D o ns =3D=20
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><FONT=20
size=3D2>&nbsp;</FONT></o:p></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>Attached is=20
our forced unmount patch. This patch is the update of the fumount patch tha=
t=20
Villalovos posted to CGL mailing list on 10/27/04. And, some parts of the D=
ave=20
Jiang=A1=AFs patch(april 2005) are applied on the patch.<o:p></o:p></FONT><=
/SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>We=A1=AFve tested=20
Dave=A1=AFs patch and found some problems. Firstly, if there are two or mor=
e=20
processes running for a same binary file on the filesystem, fumount does no=
t=20
work correctly. Secondly, while a process has a reference to a file, if fum=
ount=20
closes the file, the file is freed suddenly. This can cause the kernel pani=
c.=20
The 5 second wait is not enough when a huge number of processes are accessi=
ng=20
the filesystem.<o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><FONT=20
size=3D2>&nbsp;</FONT></o:p></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>We=A1=AFve solved=20
these problems. <o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>We have done=20
bug fix about the unmapping vmas. <o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>And, to solve=20
the second problem, a new count variable is added in the struct file. This =
count=20
is increased when a system call starts and decreased when system call exits=
. The=20
related system calls are file operations like read, write, seek, etc. This =
count=20
makes fumount know that the file operation has a reference to a file. Fumou=
nt=20
does not close the file as long as the file operation is in=20
progress.<o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><FONT=20
size=3D2>&nbsp;</FONT></o:p></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>We=A1=AFve tested=20
our patch on ext2, ext3, and reiser fs. In addition, we=A1=AFve confirmed t=
hat our=20
fumount works correctly while thousands of processes are accessing the=20
filesystem. We=A1=AFve used AIM7 benchmark for this=20
test.<o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><FONT=20
size=3D2>&nbsp;</FONT></o:p></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>There are some=20
problems remained in this patch. When thousands of processes start running =
and=20
exit for a binary file on the filesystem, fumount sometimes causes kernel p=
anic.=20
We are working on this problem now.<o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><FONT=20
size=3D2>&nbsp;</FONT></o:p></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>Comments or=20
bug reports would be appreciated.<o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT size=3D2>Thank<SPAN=20
class=3D453345705-10092005> you</SPAN>,<o:p></o:p></FONT></SPAN></P>
<DIV><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><FONT=20
size=3D2></FONT></o:p></SPAN>&nbsp;</DIV>
<DIV><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><SPAN=20
class=3D453345705-10092005><FONT size=3D2>Eun-Ji=20
Lim</FONT></SPAN></o:p></SPAN></DIV>
<DIV><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><SPAN=20
class=3D453345705-10092005><FONT size=3D2><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
A=20
href=3D"http://www.etri.re.kr/www_05/e_etri/"></A></SPAN></FONT></SPAN></o:=
p></SPAN>&nbsp;</DIV>
<DIV><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><SPAN=20
class=3D453345705-10092005><FONT size=3D2><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial">-=
-------------</SPAN></FONT></SPAN></o:p></SPAN></DIV>
<DIV><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p><SPAN=20
class=3D453345705-10092005><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
o:p>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial; m=
so-bidi-font-weight: bold"><FONT=20
size=3D2>I=A1=AFm working for ETRI(Electronics and Telecommunications Resea=
rch=20
Institute) in <?xml:namespace prefix =3D st1 ns =3D=20
"urn:schemas-microsoft-com:office:smarttags" /><DEFANGED_st1:place=20
w:st=3D"on"><DEFANGED_st1:country-region w:st=3D"on">Korea</DEFANGED_st1:co=
untry-region></DEFANGED_st1:place>.=20
ETRI is a non-profit government-funded research organization established in=
=20
1976.<o:p></o:p></FONT></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
A=20
href=3D"http://www.etri.re.kr/www_05/e_etri/"><FONT=20
size=3D2>http://www.etri.re.kr/www_05/e_etri/</FONT></A></SPAN></P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT=20
size=3D2></FONT></SPAN>&nbsp;</P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT=20
size=3D2></FONT></SPAN>&nbsp;</P>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3D=
"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial"><=
FONT=20
size=3D2></FONT></SPAN>&nbsp;</P><SPAN lang=3D"EN-US"=20
DEFANGED_style=3D"FONT-FAMILY: =B1=BC=B8=B2; mso-bidi-font-family: Arial">
<DIV align=3Dleft><FONT=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>Eun-Ji<SPAN=20
class=3D453345705-10092005> Lim</SPAN><BR>Member of Engineering Staff<BR>Sy=
stem=20
Software Team / Internet Server Group<BR>Digital Home Research=20
Division<BR>Electronic and Telecommunications Research Institute</FONT></DI=
V>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV align=3Dleft><FONT size=3D2>e-mail&nbsp;&nbsp;&nbsp;&nbsp; : </FONT><A=
=20
href=3D"mailto:[email protected]"><FONT size=3D2>[email protected]</FONT></A>=
<BR><FONT=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT></DIV>
<P class=3D"MsoNormal" DEFANGED_style=3D"MARGIN: 0cm 0cm 0pt"><o:p><FONT=20
size=3D2></FONT></o:p></SPAN>&nbsp;</P></o:p></SPAN></DIV></SPAN></o:p></SP=
AN></BODY></HTML>

------------=_1126332420-30756-630--

--===============11004486596511831==
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

_______________________________________________
cgl_discussion mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/cgl_discussion

--===============11004486596511831==--